Bing UET Tag in Iframes

Bing UET Tag in Iframes

After expanding my advertising efforts with my company OMP Tools from Google AdWords to Bing Ads, I ran into a few difficulties while implementing a functioning Conversion Tracking with the UET Tag.

The difference between UET Tag and AdWords Conversiontracking

The two tracking methods are fundamentally different, as for example FRWD wrote in his excellent article about bing ads UET.

Basically, the UET Tag is more like the Google Analytics tag, so it should be implemented on every single page to allow Microsoft to collect all the datas. In a second step, you have to define the Goals in Bing Ads.

This version of the tracking offers various advantages:

  • measuring site-wide statistics as conversions (duration of visit, …)
  • easy implementation (one single script)
  • Javascript events

But, like always, with increased settings comes increased risk of errors. Just the definition of every single target Url could have users sweating if they entered the values correctly.

Where I ran into an issue

My Problem, on the other hand, was something a little different. On some landingpages that I use, the tracking of conversions is done via AJAX in an Iframe. So i put the UET Tag into the Iframe, and voila – it fired, no problem.

Just a few hours later I realized that there is more to it, because Microsofts bat.js does not track the direct URL if the window.self differs from the

This is quite bad for this (I know, not best practise, but hey – it happens all the time) method of tracking, as the targetURL does not get tracked by UET. Therefor I altered the script a little bit to exclude this part and changed it to that:

The minified version of this script can be found at


If you have trouble tracking conversions in an Iframe when unsing Bing UET Tag, you can think about embeding my script instead. It is the same, but without the three lines removed.

Please be sure to validate if this works for you. If so, change your UET Tag from

to this:

It works perfectly for me – the submitted „p“ parameter now shows the URL of the Iframe.

Hinterlasse eine Antwort

* Die Checkbox für die Zustimmung zur Speicherung ist nach DSGVO zwingend.

Ich stimme zu.