homepage Welcome to WebmasterWorld Guest from 54.145.238.55
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
Forum Library, Charter, Moderators: Receptional & mademetop

Website Analytics - Tracking and Logging Forum

    
Why Is G/A Showing Second Page The Same As The Landing Page?
Planet13

WebmasterWorld Senior Member planet13 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



 
Msg#: 4596784 posted 4:42 pm on Jul 26, 2013 (gmt 0)

When I look at a particular page in the Landing Pages section of G/A, I will often look at the Entrance Paths tab to see where they went to next.

Oddly enough, the first page listed in the section that lists the second page is the same landing page (i.e., it lists itself as the first result in the Second Page).

Does that mean that they reloaded the page?

I think it MIGHT be because I am triggering an event when people scroll at least 250PX down the page (I also trigger another event when they make it to the bottom of the content DIV.)

Is there any way to avoid this?

 

DrDoc

WebmasterWorld Senior Member drdoc us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4596784 posted 7:59 pm on Jul 31, 2013 (gmt 0)

What type of event are we talking? Something that causes the GA code to be reloaded?

Planet13

WebmasterWorld Senior Member planet13 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



 
Msg#: 4596784 posted 10:43 pm on Aug 1, 2013 (gmt 0)

Well, I don't THINK it causes the GA code to be reloaded. But I have to admit I don't know javascript / GA well enough to say for sure.

I can post the whole code here. Sorry it is not all that fun:

jQuery(function($) {
// Debug flag
var debugMode = false;

// Default time delay before checking location
var callBackTime = 100;

// # px before tracking a reader
var readerLocation = 250;

// Set some flags for tracking & execution
var timer = 0;
var scroller = false;
var endContent = false;
var didComplete = false;

// Set some time variables to calculate reading time
var startTime = new Date();
var beginning = startTime.getTime();
var totalTime = 0;

// Track the aticle load
if (!debugMode) {
_gaq.push(['_trackEvent', 'Reading', 'ArticleLoaded', '', , true]);
}

// Check the location and track user
function trackLocation() {
bottom = $(window).height() + $(window).scrollTop();
height = $(document).height();

// If user starts to scroll send an event
if (bottom > readerLocation && !scroller) {
currentTime = new Date();
scrollStart = currentTime.getTime();
timeToScroll = Math.round((scrollStart - beginning) / 1000);
if (!debugMode) {
_gaq.push(['_trackEvent', 'Reading', 'StartReading', '', timeToScroll]);
} else {
alert('started reading ' + timeToScroll);
}
scroller = true;
}

// If user has hit the bottom of the content send an event
if (bottom >= $('.entry').scrollTop() + $('.entry').innerHeight() && !endContent) {
currentTime = new Date();
contentScrollEnd = currentTime.getTime();
timeToContentEnd = Math.round((contentScrollEnd - scrollStart) / 1000);
if (!debugMode) {
_gaq.push(['_trackEvent', 'Reading', 'ContentBottom', '', timeToContentEnd]);
} else {
alert('end content section '+timeToContentEnd);
}
endContent = true;
}

// If user has hit the bottom of page send an event
if (bottom >= height && !didComplete) {
currentTime = new Date();
end = currentTime.getTime();
totalTime = Math.round((end - scrollStart) / 1000);
if (!debugMode) {
if (totalTime < 60) {
_gaq.push(['_setCustomVar', 5, 'ReaderType', 'Scanner', 2]);
} else {
_gaq.push(['_setCustomVar', 5, 'ReaderType', 'Reader', 2]);
}
_gaq.push(['_trackEvent', 'Reading', 'PageBottom', '', totalTime]);
} else {
alert('bottom of page '+totalTime);
}
didComplete = true;
}
}

// Track the scrolling and track location
$(window).scroll(function() {
if (timer) {
clearTimeout(timer);
}

// Use a buffer so we don't call trackLocation too often.
timer = setTimeout(trackLocation, callBackTime);
});
});

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved