Expand my Community achievements bar.

Adobe Analytics Champions applications are now OPEN! Applications are open through June 2nd. Click the link to learn more and apply.

Iframe load event - Adobe Data Collection


Level 4

Hi ,


We have a iframe form on landing page and ask is to measure the no of times the iframe is successfully loaded. Is there any solution for this in Adoe analytics ?


Triggering an data layer on i frame load event is good option ? Please sugget.




3 Replies


Level 1

Assuming your Adobe Data Collection Tags (Launch) code is loading in the parent window, so long as the iframe content has the same-origin (hostname) you can use something like this in a Rule Event -> Extension:Core -> Event Type:Custom Code

document.getElementById('your iframe id here').onload = function() {




Community Advisor

There is another thing that you would want to make sure of when tracking the iframe.... if the data is going into the main suite (same as the parent site), then you don't want to track the iframe as a page view s.t() on the initial loading of the page.... as this will cause double tracking of page views every time the parent page is loaded.

You would want to add some constraints to prevent the initial load from triggering a Page View (basically, when the parent page is loaded the initial iframe load should be part of the parent's PV event.. not its own separate call)... this makes the implementation trickier.. but it's better than inflating your stats.


Community Advisor

It's kind of unusual to want to track when an IFRAME gets loaded. ... unless you're trying to do some UI troubleshooting, in which case, ok, that makes sense (or maybe the devs could check their logs too to see if the IFRAME's content actually gets loaded).

The method suggested by @philschmidt should work for you. Or if your devs are loading the IFRAME via a script, then ask them to add a _satellite.track Direct Call or push to your parent window's data layer at the end of their code. Whatever it is, do keep in mind @Jennifer_Dungan's warning, so that you're not double-counting your IFRAME content.

page footer