iFrame elements load-time | Community
Skip to main content
New Participant
February 5, 2019
Solved

iFrame elements load-time

  • February 5, 2019
  • 1 reply
  • 2364 views

Hi all

I have an iframe on a page which have 4 different div elements. I have to integrate the DTM in the iframe to get it track . The content of each div element is populated by different sources and take different time to get load.

So, the business question that I have to solve is how much time each div element takes to load in the iframe? For example, if the 4 div elements took 1 sec, 2 secs, 5 secs, 9 secs respectively to load, I have to extract these load times of individual div elements. I can see the load time of these div elements in the browser (Chrome) Network tab but don't know how to grab it.

Thanks in advance

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Gigazelle

You would want to implement DTM on the parent page, and use custom JS logic to determine load time for each. This page has some helpful variables to aid you in creating that JS logic:

Calculating Page Load Time In JavaScript - Stack Overflow

The second answer on that page in particular can help establish timestamps for certain assets, which you can then perform math on and ultimately obtain the load time for each frame.

1 reply

Gigazelle
GigazelleAccepted solution
Employee
February 15, 2019

You would want to implement DTM on the parent page, and use custom JS logic to determine load time for each. This page has some helpful variables to aid you in creating that JS logic:

Calculating Page Load Time In JavaScript - Stack Overflow

The second answer on that page in particular can help establish timestamps for certain assets, which you can then perform math on and ultimately obtain the load time for each frame.