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.
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:
- Generate your remarketing tag.
- 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>
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js" target="_blank">http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;"><img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1065610311/?label=lead&guid=ON&script=0" target="_blank">http://www.googleadservices.com/pagead/conversion/111111/?label=lead&guid=ON&script=0" />
</div>
</noscript>
The tag now looks like the following:
<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1065610311/?label=lead&guid=ON&script=0" target="_blank">http://www.googleadservices.com/pagead/conversion/111111/?label=lead&guid=ON&script=0" />
- 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:
- Use a function like the following to generate a random number:
ord=Math.random();
ord=ord*10000000000000000000;
- Add the random parameter to the tag:
<script language="JavaScript" type="text/javascript">
//<![CDATA[
document.write('<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/0123456789/?label=lead&guid=ON&script=0" target="_blank">http://www.googleadservices.com/pagead/conversion/123456/?label=lead&guid=ON&script=0&random=' + ord + '"');
document.write('/>');
//]]>
</script>