Hi - I have previously installed this module successfully using default settings. On a new site, I enabled the module, added my GA id etc. and the tracking code is not being added to any of my pages. I checked permissions for "access content" are okay, and also that $closure exists at the bottom of my template pages. I don't have the google tracking file cached locally. Any ideas where I should look next?
Thank you for your help.
Comments
Comment #1
hass commentedNo idea. Cannot repro. You need to debug what's wrong with your site.
Comment #2
alextronic commentedYou must add
<?php print $closure; ?>before the
</body>closing tag, in your page.tpl.php... That's where the module includes the script. Maybe your theme doesn't have that closure.Good luck.
Comment #3
doublejosh commentedNot sure why $closure was mentioned as the solution, since it's listed as known in the problem description.
Anyhow, same issue. This module has worked well for a long time for me. Am I going to have to post the code in a block?! Oh no.
Comment #4
alextronic commentedSorry sheathe..., just trying to help. Didn't read your post well.
Anyhow, if this module has worked well for other people, just saying so doesn't solve the issue.
Oh, and I didn't mention
$closureas the "solution"; in case you didn't notice, I didn't change the status to "fixed".Comment #5
hass commentedSomething not reproducible gets "won't fix". Until there is a repro case I cannot work on it.
Comment #6
debonator commentedi can reproduce this issue. i have the exact same problem. my code, which was working fine until two days ago, suddenly doesn't appear at all in my source code. here's my site: www.longdistancevoter.org. no tracking code!
Comment #7
debonator commentedupdate: i reinstalled the module and cleared cache a bunch of times, and now the code is showing up again. i'm just going to chalk this up to "weird" and forget about it.
Comment #8
hass commentedCannot say how and what you tested there, but this is not possible. Maybe you are using other modules that clutter the footer variable. It would be best to check the other modules first.
Page caching is only active for anonymous users.
Comment #9
askibinski commentedI had the same issue where the tracking code suddenly disappears.
The next day it's back up.
I noticed the ga.js is hosted locally by default and replaced every day.
Could it be that if the code - for some reason - cannot be replaced during this daily update (cron I guess), it isn't updated at all for a whole day?
This would explain why the code suddenly worked the next day.
Comment #10
hass commentedCan you define the tracking code suddenly disappears.? The footer code cannot disapear!?
Ga.js is NOT cached local by default.
Figure out the reason and repoet back, please. Until this - cannot repro.
Comment #11
drewlandis commentedso i've been using drupal for awhile and this is the first time i've registered to comment because i felt i had something to add. for what it's worth, drupal rocks my jock. any new site i do begins with drupal. anyway...
i was having the disappearing GA code problem too. i uninstalled the module, flushed the cache, reinstalled. still nothing. so i went to the settings. i had been marking the "Do not track users by default, but let individual users to opt in" radio button, thinking i didn't want registered users tracked by default. well, that setting made the tracking code disappear altogether, even if i logged out and viewed the page. either of the other two setting made the code reappear. so i ended up using "track users by default, but let individual users opt-out" which will work for my purposes.
i'm not sure if this is a bug or just a misunderstanding as to how a specific setting is supposed to work, but i hope this helps.
Comment #12
doublejosh commentedI've fixed the issue, but I believe it was me not being aware that the admin user (among a few other roles) were set to not be tracked and I was looking at the source while logged in. Dumb!!!
Comment #13
alextronic commentedSo you didn't fix the issue. The issue didn't need fixing.