Dynamic Remarketing Code Setup – Analytics & Non-GTM

Last Updated on June 14, 2017 by Ritwik B

Dynamic Remarketing Code Setup Methods

 

Kindly Check Adwords Dynamic Remarketing: Complete Setup Guide For Part – 1 of dynamic remarketing setup.

 

where I have explained

  • How To Link Adwords & Analytics accounts?
  • How to Preview Dynamic Remarketing Ads?

There are various methods to implement dynamic remarketing. Here is the hierarchy of most of the methods used.

Dynamic Remarketing Hierarchy - Digishuffle

 

 

We will be looking at Manual Code Placement —> Analytics method to implement dynamic remarketing.

 

Dynamic Remarketing using Analytics – Non-GTM Method

Step 1:

  • There are 3 custom parameters in any business type, they are
    • ID [Required]
    • Page Type [Optional]
    • Total Value [Optional]
  • These parameters are used as a condition to create remarketing list in Adwords.
  • You can implement them in any business type.
  • In Analytics, go to Property > Custom Definition > Custom Dimensions.
  • Create 3 Hit level dimensions, (can name anything)
    • dynx_prodid
    • dynx_pagetype
    • dynx_totalvalue

dynamic remarketing Custom Dimension - Digishuffle

 

Step 2:

  • Go To Property > Audience Definition > Dynamic Attributes.
  • Create dynamic attribute linking.
  • Verify the business type, AdWords linked account.
  • Assign the custom dimension created in Step#1 to respective attributes.
  • You can also assign only ID attribute.

Dynamic Attribute for dynamic remarketing - digishuffle

 

Step 3:

  • You can add the new line ‘ga(‘set’, ‘dimension[X]’, [value])’ in the analytics code. (replace the [x] & [value] with respective dimension index & value).
  • You can add this code on product_pages, search_results_pages, product_listing_pages, etc . (replace the proper values in dimensions)
  • Replace your analytics code as follows. Eg: product_page
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-XXXXX-YY', 'auto'); // Insert your GA Web Property ID here, e.g., UA-12345-1
  
//////////// New lines Added////////////////////
  ga('set','dimension2','12345'); // REQUIRED Item ID value, e.g., 12345, 67890
 
  ga('set','dimension4',’product_page’); // Optional Page type value, e.g., home, searchresults
 
  ga('set','dimension3','699.95'); // Optional Total value, e.g., 99.95, 5.00, 1500.00
  
///////////////////////////////////////////////

  ga('send', 'pageview');

</script>

 

  • If you want to track Add To Cart, Remove From Cart, Button Click, etc, you can use
    ga('send', 'event', 'Click', 'Add To Cart');

    Note: Make sure you have implemented the ga set command on pageview where events are tracked.

     

  • If your pageview code does not contain ga set command. Use
    ga('send', 'event', 'Click', 'Add To Cart', {
      'dimension2': 24.99,
      'dimension3': 699.80,
      'dimension4' : 'product_page'
    });

     

Step 4:

  • Keep an eye on Adwords > Shared Library > Audiences. Check if the search & display audiences are getting filled.
  • You’ll see an error for 2-3 days until the data gets populated via analytics. So ignore it.
  • Check here if the error persists.
    https://support.google.com/adwords/answer/7287994?hl=en

Dynamic Remarketing Error - Digishuffle

 

 

Conclusion

  • You can implement the above process for any business type.
  • IDs passed in the code should match the ID column.
  • You can get error messages if Ids don’t match the Ids in Feed.
  • Keep an eye on the display audiences list.

 

More Articles:

Adwords CPA Scanner – Analyze & Reduce High CPAs in Seconds.

Adwords Advanced Automated Reports – Daily/Weekly/Monthly

Time On Visible and Hidden Pages – Google Analytics

4 Mistakes To Avoid While Starting Digital Marketing Campaigns.

Ritwik is a Web Analyst & Product Marketer. He loves to write technical & easy to understand blogs for Marketers & Entrepreneurs. Focused on Google Analytics, Facebook Analytics, Tag Management, Marketing & Automation Scripts & more. Google Certified Professional. A Firm Believer in Teaching -> Learning -> Growing. :)

Leave a Reply

Your email address will not be published. Required fields are marked *