Posts under category Google

I used to upload offline conversion using following code in v201809 version as provided at https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201809/Remarketing/UploadOfflineConversions.php

$oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); $session = (new AdWordsSessionBuilder())->fromFile()->withOAuth2Credential($oAuth2Credential)->withClientCustomerId($customerid)->enablePartialFailure()->build(); $adWordsServices = new AdWordsServices(); $offlineConversionService = $adWordsServices->get($session, OfflineConversionFeedService::class); $conversionName="OfflineConv"; $feed = new OfflineConversionFeed(); $feed->setConversionName($conversionName); $feed->setConversionTime($conversionTime); $feed->setConversionValue($conversionValue); $feed->setGoogleClickId($gclid); $offlineConversionOperation = new OfflineConversionFeedOperation(); $offlineConversionOperation->setOperator(Operator::ADD); $offlineConversionOperation->setOperand($feed); $offlineConversionOperations = [$offlineConversionOperation]; $result = $offlineConversionService->mutate($offlineConversionOperations); 

Now I am upgrading to V9, I have used the code as provided at https://github.com/googleads/google-ads-php/blob/main/examples/Remarketing/UploadOfflineConversion.php

$oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile()->withOAuth2Credential($oAuth2Credential)->build(); //$conversionName="OfflineConv"; $conversionName = ConversionActionType::WEBPAGE; $clickConversion = new ClickConversion([ 'conversion_action' => ResourceNames::forConversionAction($customerId, $conversionName), 'gclid' => $gclid, 'conversion_value' => $conversionValue, 'conversion_date_time' => $conversionTime, 'currency_code' => 'USD' ]); $conversionUploadServiceClient = $googleAdsClient->getConversionUploadServiceClient(); $result = $conversionUploadServiceClient->uploadClickConversions($customerid, [$clickConversion], true); 

The problem is when we set $conversionName="OfflineConv"; we get following error. Resource name 'customers/9025381111/conversionActions/OfflineConv' is malformed: expected 'customers/{customer_id}/conversionActions/{ConversionType.conversion_type_id}'., at conversions[0].conversion_action

and when we set $conversionName = ConversionActionType::WEBPAGE; we get following error. This customer does not have an import conversion action that matches the conversion action provided., at conversions[0].conversion_action

Can someone help me?

I'm new to google ads and need to apply conversion tracking to a form submission on my site. The site offers translation in two locales (en, de). I've created two marketing campaigns for corresponding regions. So far I've integrated the english ad conversion into my site and tested it with the google tag assistant, which works. I am having two question:

  1. Google ads seems to track the ad campaign's id on my site. How does it know, if someone who submitted a form, truly clicked on the ad? Does the ad click send info to the site that "this visitor came here by clicking on this ad"? Does this function handle it?

     gtag('event', 'conversion', {      'send_to': "id...",      'event_callback': callback  }); 
  2. How does google ads know, wether the visitor comes from the en ad or the de ad? I am thinking about triggering the corresponding conversion id depending on the locale of the visitor but this would exclude for example german visitors with en language set in their browser and would count them as conversions of the en campaign.

How do you handle this case?

The folk ad Google have been nagging me to include 'enhanced conversion data' for sales on the website. This entails passing over to google personal information about the person who placed the order (email, name, address).

This seems like a privacy no-no. I'm in the UK so GDPR law applies, but regardless it seems like shady behaviour to pass these details on to another company without consent. Is it compliant with GDPR law?

Also, what's in it for me? Google say it makes the conversion tracking more accurate, but they would, wouldn't they?

Could you please confirm GQAL doesn't support compound WHERE clause?

 FROM group_placement_view\  WHERE\     metrics.impressions >= 10000 \     AND (metrics.video_view_rate < 10' OR metrics.average_cpm > 10000 ) 

and not event OR as non-compound clause?

    metrics.average_cpm\  FROM group_placement_view\  WHERE\     metrics.impressions >= 10000 \     OR metrics.video_view_rate < 10'