Can a page be tagged via an HTML iframe?

An iframe can contain AT Internet tags, as well as all the JavaScript you would require to measure the element itself, or other things such as clicks.

If the iframe is loaded on a partner page, all the code contained within will be executed from said page. This includes all tagging.

We recommend using the newer version of our tag, SmartTag, instead of its predecessor xtcore.js to tag an iframe. The xtcore.js tag has global variables which can create conflicts if several values are present on the page the iframe is loaded on.

With SmartTag you can generate a unique namespace. For example, var ATTagExample = new ATInternet.Tracker.Tag(); will generate a ATTagExample namespace unlikely to be used elsewhere. This will avoid any conflicts between the iframe's and the page's code.

All the methods available for SmartTag can be used in an iframe. It can be considered a normal page element, loaded within a parent document.

Have more questions? Submit a request