Google Ads API V1.0 RemarketingSetting

211 views
Skip to first unread message

Priya

unread,
May 7, 2019, 8:21:51 AM5/7/19
to AdWords API and Google Ads API Forum


I use the field Google.Api.Ads.AdWords.v201809.RemarketingSettings.snippet in my .AdWords.v201809.  I am not able to find this field in  Google.Ads.GoogleAds.V1.Resources.RemarketingSetting. Kindly share your suggestion. 

Thanks. 

googleadsapi...@google.com

unread,
May 7, 2019, 3:06:13 PM5/7/19
to adwor...@googlegroups.com, devip...@gmail.com
Hello, 

You may use the CustomerService to get the remarketing settings details. If you're looking to get the snippet, customer resource which will return the tag_snippets used for tracking remarketing actions.

Thanks,
Bharani, Google Ads API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Priya

unread,
May 9, 2019, 9:15:01 AM5/9/19
to AdWords API and Google Ads API Forum
Thanks for your time. The snippet I get from adwords and google ads api looks different.  I have added the steps for both api below and the snippets. Please let me know if any one snippet from Google Ads API remarketing action  same as snippet from adwords ?

In Google.Api.Ads.AdWords.v201809, I do the following steps.
1. Create a CustomerClient
2. Get a Customer using its customerId. 
3. Get Remarketing Tag snippet from Customer using customer.remarketingSettings.snippet . The sample of the snippet mentioned below.
<!-- Google Code for Remarketing Tag -->  <!--------------------------------------------------  Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. See more information and instructions on how to setup the tag on: http://google.com/ads/remarketingsetup  --------------------------------------------------->  
<script type="text/javascript">  /* <![CDATA[ */  var google_conversion_id = xxxxxxxxx;  var google_custom_params = window.google_tag_params;  var google_remarketing_only = true;  /* ]]> */  
</script>  
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">  
</script>  
<noscript>  
<div style="display:inline;">  <img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/xxxxxxxxx?guid=ON&amp;script=0"/>  </div>  
</noscript> 

As you suggested, I used remarketing_action resource to get tag_snippets  in GoogleAdAPI V1.0 . Please find its steps below. 

1. Create a CustomerClient
2. Create a RemarketingAction using its customerId. 
3. Get Remarketing action using RemarketingActionResourceName from step 2. 
4. I get 4 tag snippets . I posted the two snippets for HTML page format. 


Type : WebpageOnclick
PageFormat: HTML
EventSnippet:
<!-- Event snippet for remarkingaction conversion page
In your html page, add the snippet and call gtag_report_conversion when someone clicks on the chosen link or button. -->
<script>
function gtag_report_conversion(url) {
  var callback = function () {
    if (typeof(url) != 'undefined') {
      window.location = url;
    }
  };
  gtag('event', 'conversion', {
      'send_to':   ' ',
      'aw_remarketing_only': true,
      'event_callback': callback
  });
  return false;
}
</script>

Type : Webpage
PageFormat:HTML
EventSnippet:
<!-- Event snippet for remarkingaction remarketing page -->
<script>
  gtag('event', 'conversion', {
      'send_to': '',
      'aw_remarketing_only': true
  });
</script>

googleadsapi...@google.com

unread,
May 9, 2019, 2:55:39 PM5/9/19
to devip...@gmail.com, AdWords API and Google Ads API Forum
Hi Priya, 

Could you please share the exact request and response logs from both the AdWords API and Google Ads API to check this further? You may share the details privately via Reply privately to author option.

Thanks,
Bharani, Google Ads API Team
Reply all
Reply to author
Forward
0 new messages