Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

iFrame elements load-time

sarfarazk130377
Level 1
Level 1

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

1 Accepted Solution
Gigazelle
Correct answer by
Employee
Employee

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.

View solution in original post

1 Reply
Gigazelle
Correct answer by
Employee
Employee

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.

View solution in original post