I am using:

https://developers.google.com/analytics/devguides/collection/protocol/v1/

for server side tracking.

This is the set-up:

  • Google analytics account.
  • Google adwords account.
  • Adwords account is linked to the analytics account.

I create an ad in adwords, the user clicks the ads, the user visits the third party website, the third party website make a https POST request with the visitor gclid from adwords. This is stored in a mysql database.

In the google adwords account I have an event for conversion created. (Using the offline tracking conversion works, but the only reason why I would prefer to use measurement protocol is because the offline tracking only accepts the conversions after 90 minutes. )

And I send the page views and conversion in this way:

/**  * @param $gclid  * @param $clientId  * @return \TheIconic\Tracking\GoogleAnalytics\AnalyticsResponse  */ private function sendPageView($gclid, $clientId){     $this->analytics         ->setProtocolVersion(1)         ->setTrackingId(self::GLOBAL_TRACKING_ID)         ->setGoogleAdwordsId($gclid)         ->setAnonymizeIp(true)         ->setClientId($clientId);     return $this->analytics->sendPageview(); } /**  * @param $gclid  * @param $clientId  * @return \TheIconic\Tracking\GoogleAnalytics\AnalyticsResponse  */ private function sendConversion($gclid, $clientId, $url){     $this->analytics         ->setProtocolVersion(1)         ->setTrackingId(self::GLOBAL_TRACKING_ID)         ->setGoogleAdwordsId($gclid)         ->setAnonymizeIp(true)         ->setClientId($clientId)         ->setEventAction('s2s')         ->setEventCategory('Lead')         ;     return $this->analytics->sendEvent(); } 

Response:

object(TheIconic\Tracking\GoogleAnalytics\AnalyticsResponse)#1008 (3) {   ["httpStatusCode":protected]=>   int(200)   ["requestUrl":protected]=>   string(164) "https://ssl.google-analytics.com/collect?v=1&tid=UA-1XXXXX-1&gclid=EAIaIQobChMInvrxopLZ5gIVXXXXXXXXXXXXXXXXXXXX_BwE&aip=1&cid=1&ea=s2s&ec=Lead&t=event"   ["responseBody":protected]=>   string(35) "GIF89a�����,D;" } 

So the response is 200, however the conversion is not recorded anywhere, and I am not sure if I should be sending any other parameter, or how to debug the issue.

The WhatsApp Business API does not have a ref parameter (like Messenger does, for instance) which allows the receiving application to know where a given WhatsApp user came from.

Conversations with a business over WhatsApp are usually initiated via a link -- and the only fields that can be supplied to the wa.me link are the number and text fields (source).

Is there a way that I can get around this restriction, and add a ref parameter (e.g. ref=google-ad) to the link?

I am making a web application that will automate some actions on Google AdWords. The web application can be used by anyone that has an AdWords account.

I am a bit puzzled by the AdWords API, as it is a different from other Google APIs, in terms that it needs two additional config parameters: developerToken and clientCustomerId, a per their documentation:

https://developers.google.com/adwords/api/docs/guides/first-api-call

When constructing the AdWordsClient object, I need to provide the developerToken and clientCustomerId, in order to push data to AdWords.

My question is whether these two parameters (developerToken, clientCustomerId) need to be different for each user that will use my web application?

It seems that I am able to post data to different accounts with an unrelated developerToken, which does not make sense.

Can I get the clientCustomerId from an API endpoint, so I don't require my users to manually input tokens and ids to the web app, and do the complete authentication with oAuth?

My code is working, I am asking more of the philosophy why I need these two parameters, and if I can avoid asking the user to manually copy them from the AdWords dashboard into my application?