Skip to main content
Skip table of contents

Can a page be tagged via an HTML iframe?

An iframe can contain Piano Analytics 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 latest version of our library to tag an iframe. Our SDKs use global variables, however, which can create conflicts if several values are present on both the page on which the iframe is loaded and the iframe itself.

It is important to consider using unique namespaces. This will avoid any conflicts between the iframe's and the page's code.

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

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.