Using jquery getScript in onload function seems to break statcounter

Discussion in 'Help' started by terraling, Apr 30, 2012.

Thread Status:
Not open for further replies.
  1. terraling

    terraling New Member

    Apr 30, 2012
    Likes Received:

    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

    	//Load statcounter code
    	var sc_project=6556413; 
    	var sc_invisible=1; 
    	var sc_security="xxxxxxx";
    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.
Thread Status:
Not open for further replies.

Share This Page