Welcome to WebmasterWorld Guest from 54.166.87.123

Forum Moderators: DixonJones & mademetop

Message Too Old, No Replies

google analytics code slowing down links

   
5:29 pm on Nov 21, 2011 (gmt 0)

5+ Year Member



Hello,

Our website is setup so that any link clicked within "domain.com/Referrals/" is counted as a goal. Currently, every html file in this /Referrals/ directory has the google analytics code directly in the file. This tracks goals and pageviews just fine, however, it is adding significant load times (2-3 seconds) when any link is clicked. We have looked at our files and they just simple redirects, and I think it hangs for a few seconds while loading the GA code.

My question is - Is there anyway to decrease this load time? Is this standard or could there be another reason why I am experiencing this extra few seconds of load time?

Thanks!
12:32 am on Nov 24, 2011 (gmt 0)

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Anytime code is loaded from a third party there is the possibility of increased delay. I don't know of a way to reduce that time.
6:48 pm on Nov 25, 2011 (gmt 0)

5+ Year Member



Yeah not sure if it's possible or if there is anything we can do about that. I guess I'm wondering if it's standard to have this extra few seconds of load while calling the GA code.
7:30 pm on Nov 28, 2011 (gmt 0)



Hi,

You might want to take a look into event tracking. See the below example of event tracking attached to a link. This shouldn't take multiple seconds to track referrals.

<a href="http://www.webmasterworld.com/" onClick="_gaq.push(['_trackEvent', 'Referrals', 'Click', 'Referral name']);">Anchor</a>


You can use events to set-up goals in Google Analytics.

Thanks,
Gerron