Can a form hosted in an iframe be tracked?
Short answer
Yes. The Eulerian tag will need to be called:
- either from the iframe, where it can access the form data, but only if the iframe’s source is on the same domain as the parent,
- or from the page the iframe is embedded in.
The second option is the recommended one. You simply need to make sure the parent page can access the iframe’s form data (same-origin policy).
What is an iframe?
An iFrame (short for “inline frame”) is an HTML tag (<iframe>) that embeds another web page inside the current page.
In other words, an iFrame displays the content of another URL in a specific section of a web page.
When might an Eulerian customer need to track events inside an iframe?
Embedded widgets
Widgets such as interactive maps, contact forms, live chats and social media embeds are often embedded through iFrames, especially when the service comes from a specialist provider.
Partner content
On some sites, content from partners or affiliates may be displayed through iFrames.
Embeddable web applications
Some web applications are designed to be embedded in other sites through iFrames. For example, a travel booking application embedded in a tourism site.