Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I installed & set up this module but I could not find how to solve one problem.
I am not sure is there any option how to do this or this should be feature request.
The problem is:
I need to place Google Analytics code in the header and every other JS in footer.
Google Analytics code should be in header because I can not verify Webmaster tools if it is in footer.
Comment | File | Size | Author |
---|---|---|---|
#5 | advagg-2898140-GA-in-header.patch | 583 bytes | mikeytown2 |
Comments
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedI'll add a settings for that in the future. Until then you can use the 'scope_lock' key to keep it in the header. I didn't know about this; good to know: https://support.google.com/webmasters/answer/35179?hl=en#google_analytic...
Comment #3
bojan.m CreditAttribution: bojan.m at Studio Present commentedI tested and everything works great.
Thanks.
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedComment #8
dalehgeist CreditAttribution: dalehgeist commentedWas this fix rolled into 7.x-2.30 (the version I'm using)? Google is complaining that my GA tracking code is not in the header (onlinedriversed.com).
Comment #9
mikeytown2 CreditAttribution: mikeytown2 commentedYeah this was rolled in on Aug 10th 2017. Are you using https://www.drupal.org/project/google_analytics ?
Comment #10
dalehgeist CreditAttribution: dalehgeist commentedLooks like I (actually whoever built this site) did not use the Drupal module, just added the code snippet. I ended up working around this, but if I encounter it in the future I'll use the GA module. Thanks!