Non-JavaScript remarketing tags

For remarketing, Google produces a script tag that includes a <noscript> portion along with an <img> tag. While there are advantages to using the full tag, if you have policies against placing script tags on your webpages, you have the option of using a non-JavaScript tag instead.

We highly recommend using the JavaScript version of the tag because it provides the benefits of correct caching behavior and spam detection.

If you do choose to use a non-JavaScript version, then the browser caches the tag and it won't reach the server after the user's first visit to that page. The JavaScript version adds a random number to the tag to avoid caching, ensuring that the cookie's membership in the remarketing list is refreshed with each visit.

To use the non-JavaScript version of the remarketing tag:

  1. Generate your remarketing tag.
  2. Remove all code that's highlighted in yellow:

    <!-- Google Code for Lead Conversion Page -->
    <script type="text/javascript">
    var google_conversion_id = 111111;
    var google_conversion_language = "en_US";
    var google_conversion_format = "1";
    var google_conversion_color = "ffffff";
    var google_conversion_label = "lead";
    <script type="text/javascript" src="" target="_blank">">

    <div style="display:inline;">

    <img height="1" width="1" style="border-style:none;" alt="" src="" target="_blank">;guid=ON&amp;script=0" />

    The tag now looks like the following:

    <img height="1" width="1" style="border-style:none;" alt="" src="" target="_blank">;guid=ON&amp;script=0" />
  3. Place it on the page(s) or server(s) from which you want to collect users.

To simply create a lightweight version of the tag, try something similar to this:

  1. Use a function like the following to generate a random number:



  2. Add the random parameter to the tag:

    <script language="JavaScript" type="text/javascript">


    document.write('<img height="1" width="1" style="border-style:none;" alt="" src="" target="_blank">;guid=ON&amp;script=0&random=' + ord + '"');




Was this article helpful?
How can we improve it?