How to fix inurl targeting in synchronous JavaScript zone tags

Certain versions of Google Chrome may interfere with inurl keyword targeting in zones that are linked to AdButler using synchronous JavaScript zone tags. You can get around this issue by manually passing in the referrer (the page URL), allowing inurl keyword targets to work as usual.

  1. Copy the following line of code:
 var _absrc = absrc.split("type=js"); absrc = _absrc[0] + 'type=js;referrer=' + encodeURIComponent(document.location.href) + _absrc[1];
  1. Paste the code into the zone tag, just before document.write, as shown in the sample zone tag below.
<script type="text/javascript">
var rnd = window.rnd || Math.floor(Math.random()*10e6);
var pid######= window.pid###### || rnd;
var plc######= window.plc###### || 0;
var abkw = window.abkw || '';
var absrc = 'https://servedbyadbutler.com/adserve/;ID=######;size=0x0;setID=######;type=js;sw='+screen.width+';sh='+screen.height+';spr='+window.devicePixelRatio+';kw='+abkw+';pid='+pid######+';place='+(plc#######++)+';rnd='+rnd+';click=CLICK_MACRO_PLACEHOLDER';
var _absrc = absrc.split("type=js"); absrc = _absrc[0] + 'type=js;referrer=' + encodeURIComponent(document.location.href) + _absrc[1];
document.write('<scr'+'ipt src="'+absrc+'" type="text/javascript"></scr'+'ipt>');
</script>

If you're still having issues, open a support ticket or click here to email our support team.


Can't find what you're looking for?

Send us an email

hello@adbutler.com

Visit the blog

For more ad serving tips, industry news and AdButler insights.