Analytics
4.2K members online now
4.2K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

calculaing the displayed time for a div

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I have an intro video in the main page to give an intro about the nature of services that our site is presenting. I'm trying to calculate the time that the user spend watching the video. Also same thing in the ads div. So, is there any custom or default dimentions, metrics could calculate the time that the user spent on this part of the page? Because I need to measure the time + basic interation to see if the followed plan is worthy.

 

Thanks, in advance

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Mohammed L
February 2017

calculaing the disipay time for a div

Top Contributor
# 2
Top Contributor

the way i've done it so far is to create a custom HTML tag that creates a global variable containing a timestamp (timestamp1) based on the visibility of the DIV. Then listen for the non-visibility of the DIV, use another custom HTML tag with JS to capture the timestamp of that moment (timestamp2) then substract the value of the visibility variable.

timestamp2-timestamp1=number of seconds spent

You can use that time difference in yet another variable and pass it to a GA event tag

 

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Mohammed L
February 2017

calculaing the disipay time for a div

Top Contributor
# 2
Top Contributor

the way i've done it so far is to create a custom HTML tag that creates a global variable containing a timestamp (timestamp1) based on the visibility of the DIV. Then listen for the non-visibility of the DIV, use another custom HTML tag with JS to capture the timestamp of that moment (timestamp2) then substract the value of the visibility variable.

timestamp2-timestamp1=number of seconds spent

You can use that time difference in yet another variable and pass it to a GA event tag

 

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan