StatCounter User Forum  
StatCounter Free web tracker and counter

Go Back   StatCounter User Forum > StatCounter.com > Help

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 04-30-2012, 10:51 AM
terraling terraling is offline
Junior Member
 
Join Date: Apr 2012
Posts: 1
Default Using jquery getScript in onload function seems to break statcounter

Hi

I've been using the normal statcounter code on my site no problem for a long while, but I've trying to take a more hands on approach to managing the pageload, and I don't want statcounter to load until the end.

So I have an window.onload function which includes a jquery call to pull in the statcounter script

Code:
	//Load statcounter code
	var sc_project=6556413; 
	var sc_invisible=1; 
	var sc_security="xxxxxxx";
	$.getScript('http://www.statcounter.com/counter/counter.js');
Should be fine, I think, but I'm not seeing any activity in my statcounter pages (from computers that don't have the cookie to exclude my own visits).

Does anyone recognise why this might not be working?

Thanks for your help.
Closed Thread

Tags
jquery, onload

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:18 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.