- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
05-28-2014 06:27 AM
Solved! Go to Solution.
05-28-2014 06:47 AM
05-28-2014 07:22 AM
05-28-2014 07:25 AM
05-28-2014 07:38 AM
11-30-2015 12:40 AM - last edited on 11-30-2015 04:18 PM by kathleen_jo
Hi @Clint,
I am looking at exactly the same code snippet from Simo Ahava and I am wondering if I could replace the dataLayer.push statement (alternatively utag.link) by the following:
_gaq.push([‘_trackEvent’, ’no bounce’, ’Time spent and page scrolled’, , , 1])
Thanks,
Mohamed
05-27-2016 09:31 AM
hi Jared,
I'm just having a similar challenge with one of my clients.
The original request was to apply an adjusted bounce rate modification to the Google Universal Analytics script.
setTimeout("_gaq.push(['_trackEvent', '30_seconds', 'read'])",30000);
Would your slightly modified java extension do the trick (and more)?
(I've updated the UDO variables the way they are designated in my client's account)
{code:javascript} var visitTookTime = false; var didScroll = false; var bounceSent = false; setTimeout(function(){timeElapsed()}, 30000); window.addEventListener ? window.addEventListener('scroll', testScroll, false) : window.attachEvent('onScroll', testScroll); var scrollCount = 0; function testScroll() { ++scrollCount; if (scrollCount == 2) { didScroll = true }; sendNoBounce(); } function timeElapsed() { visitTookTime = true; sendNoBounce(); } function sendNoBounce() { if ((didScroll) && (visitTookTime) && !(bounceSent)) { bounceSent = true; utag.link({ 'event_type': 'GAEvent', 'ga_eventCategory': 'NoBounce', 'ga_event_action': 'Time spent and page scrolled' }); } } {code}
I'm keen to hear your thoughts.
cheers,
Ben
05-31-2016 09:17 AM
Copyright All Rights Reserved © 2008-2023