Google Analytics Code

Posted in: Newspaper
Post count: 19

Hi,

When I am adding my GA code here http://screencast.com/t/EtxOCuXlspj it is shown on the top of the website (UA-101…).

How to fix this?

Thank you.

Daniel

Post count: 19

No idea?

Thanks

Daniel

Post count: 19

I’ve added the GA code in the footer.php now.

Regards

Daniel

Post count: 6600

Hi,

Sorry for the delay! Please make sure you use the right code as this should not happen, use this guide: https://support.google.com/analytics/answer/1008080?hl=en

Thanks

Post count: 3

Did you solve this problem @dobrock? I have the exact same problem!

Post count: 6600

Hi,

Please make sure you use the right code as this should not happen, use this guide: https://support.google.com/analytics/answer/1008080?hl=en
If you can’t manage to figure this give us wp-access so we can have a look and provide your wp-admin login details at contact@tagdiv.com also include a link tot his tread.

Thanks

Post count: 35

Did you solve this problem

I think it’s in the file .htaccess

<IfModule mod_deflate.c>
<filesMatch "\.(js|css|html|php)$">
SetOutputFilter DEFLATE
</filesMatch>
</IfModule>

# END WordPress

AddType text/javascript .js
AddType application/vnd.ms-fontobject .eot
AddType application/x-font-ttf .ttf
AddType application/x-font-opentype .otf
AddType application/x-font-woff .woff

# BEGIN Expire headers
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/x-icon "access plus 2500000 seconds"
ExpiresByType image/jpeg "access plus 2500000 seconds"
ExpiresByType image/png "access plus 2500000 seconds"
ExpiresByType image/gif "access plus 2500000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2500000 seconds"
ExpiresByType text/css "access plus 700000 seconds"
ExpiresByType text/javascript "access plus 700000 seconds"
ExpiresByType application/javascript "access plus 700000 seconds"
ExpiresByType application/x-javascript "access plus 700000 seconds"
ExpiresByType text/html "access plus 600 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
ExpiresByType font/truetype "access plus 2500000 seconds"
ExpiresByType font/opentype "access plus 2500000 seconds"
ExpiresByType application/x-font-woff "access plus 2500000 seconds"
ExpiresByType image/svg+xml "access plus 2500000 seconds"
ExpiresByType application/vnd.ms-fontobject "access plus 2500000 seconds"
</IfModule>
# END Expire headers

# BEGIN Cache-Control Headers
<IfModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "private"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "private, must-revalidate"
</filesMatch>
</IfModule>
# END Cache-Control Headers

<IfModule mod_headers.c>
Header unset ETag
</IfModule>
<IfModule mod_alias.c>
RedirectMatch 403 /xmlrpc.php
</IfModule>

Post count: 9544

As a reminder —
those folks who actually USE xmlrpc.php
should not use that part of my suggested custom code.
We disable that for security.

However none of that should impact placement of the GA code into the theme, which is simply javascript inline — it’s not external js file — so none of that in my suggested htaccess code impacts that.

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.