How to get Google Analytics working?

chris321

I like the ginger one
Suspended / Banned
Messages
3,572
Name
Chris
Edit My Images
Yes
Right, what should have been a simple task has ballooned into something that I just can't seem to sort out!

I'm in the process of sorting out my website. It's built, and hosted with 000webhost, and I'm using their site builder and some HTML I remember to fiddle with one of their supplied templates.

I cannot for the life of me get google analytics to work though! You don't need to put the code on each page as it's template-driven, so I just go into the configuration part of the site, and paste the code into a box, and it should work perfectly.... But it doesn't.

When I go onto analytics it just says the tracking is installed and is 'waiting for data' (and has a little clock icon rather than the warning sign or the tick). The last time I did this, before I rebuild the site, it had this icon for about 24 hours, but it's been a couple of weeks now. And it took weeks to change from the 'tracking not installed' icon to 'waiting for data' as well, whereas before the rebuild I swear it took a few days at most.

Does anyone have any suggestions? :help:

Thanks a lot,

Chris
 
Still not working, still very open to suggestions :D

Chris
 
When you open the site on the web, have a look at the source and make sure the code you pasted is there - probably near the bottom somewhere.
 
If I remember it DOES have to be on every page you want to get data about.

Sorry, I should have made myself clearer! I know it needs to be on each page, but because I'm using an automated template thingy, I log into the 'behind-the-scenes' bit, paste the code into a box, then it automatically applies it to each page of my site. Hope this makes it a little more comprehensive!


When you open the site on the web, have a look at the source and make sure the code you pasted is there - probably near the bottom somewhere.

Thanks for that, I've just had a look and it's there on each page, and google analytics confirms this by saying that tracking is installed, but it's 'waiting for data'

I've just noticed that the 000webhost's own tracking that it automatically applies to every site it hosts also isn't working, could it be that the two are conflicting? Although I'm sure both worked before together, the trouble is it was such a long time ago I can't remember what I did differently before!

Chris
 
It could be waiting for data for a couple of days to a week, depending on the site traffic, how long has it been "waiting for data"

That was my first thought, which is why I left it for a while, thinking that maybe low traffic meant it took a bit longer. By my reckoning, it's been 'waiting for data' since the first week or 2 in May.


Can I paste the google code into iweb?

Erm, sure! What will that do?! (can you tell I'm new to this :D)

Chris
 
Jim_j had it right first time, look at the source that is being served and check that the tracking script is on each page
 
Might be easier if you let us know the website, also could be something like this - http://drupal.org/node/150186

Jim_j had it right first time, look at the source that is being served and check that the tracking script is on each page

Cheers for the suggestions! I'm going to start taking bits off the site as I'm guessing it's a script conflicting somewhere. I don't think it's an issue with the template, as before I moved my site to a different server I used the same template, and analytics worked fine. Tracking script is definitely there on each page, so I'll just keep poking at it until it springs into life!

Cheers for trying everyone!

Chris
 
Also you might want to check some other examples of tracking scripts, certainly ones with very similar code. Go through your code and make sure it is basically the same, even though your script says it's working, it might only be the bit that says that that is actually working and nothing else. Might be helpful even if you posted the tracking scrip here.
 
Regardless of template.

Open each HTML page in wordpage and put it in.

Remove it from the template. Unless google specifically say it's ok to use it in a template assume it's not :)
 
It's fine to put it in a page that gets called from multiple pages.

For example, I have a page, called header.php, which is called from every page on my site. I put the Google code in there, because it's called on every page, it tracks every page.

As long as the template page is called on each and every page on the site, it's fine to use the code there.

What you might find though, is if it's not in the correct place on the site (usually the header, Google recommends), then it may not track correctly.
 
Regardless of template.

Open each HTML page in wordpage and put it in.

Remove it from the template. Unless google specifically say it's ok to use it in a template assume it's not :)

Sometimes you just can't beat the old-fashioned way :D

Analytics now working, time from pasting code onto the pages to the green tick appearing - about an hour. Much less than the 2 months I'd been waiting for previously :lol:

Thanks for all the help folks :thumbs:
 
Google Analytics uses a cookie and JavaScript code to collect information about visitors and to track your advertising campaign data.It is a free service offered by Google that generates detailed statistics about visitors may include a website.Goals sales,lead generation,viewing a particular page,or download a particular file.
 
Back
Top