How to Implement Google Re-Marketing Tag in DTM?

To add the Google remarketing tag in DTM, the recommended approach is with a page load rule in DTM. Below is an example of the Google remarketing Tag. For more information on Google remarketing check out Google's documentation here

<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = XXXXXXXXX;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
<script type="text/javascript" src="//">
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//;guid=ON&amp;script=0"/>

To add the remarketing tag in DTM, complete the following: 

  1. Add a page load rule in DTM by going to Rules > Page Load Rules > Create New Rule
  2. Expand the JavaScript / Third-Party Tags section and add the following code in the Non-Sequential JS tab
  3. Save, Test, and Publish the Rule


If you are deploying the remarketing tag async instead of using conversion.js, call conversion_async.js, then add additional coding to ensure the file loads before you reference it. More information on this approach in the Google documentation here

var dcJS = document.createElement('SCRIPT');
var done = false;
dcJS.setAttribute('src', '//');
dcJS.onload = dcJS.onreadystatechange = function () {
    if(!done && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {
         done = true;
          // Handle memory leak in IE
          dcJS.onload = dcJS.onreadystatechange = null;
function callback(){
       /* <![CDATA[ */
         google_conversion_id : XXXXXXX,
         google_custom_params : window.google_tag_params,
         google_remarketing_only : true