Problem witch Google Analytics In DLE

Status
Not open for further replies.

cca1690

Active Member
453
2011
39
0
when I put the google code analtytics before </ head> BBCode for my site stop working.

The Google Analytics code I put it before </ head> in file main.tpl



Where should I put it to work well? and I of these errors on my website?


:(
 
7 comments
maybe you can add google analytics code to js file. example googleanalytic.js
then add this code
after <head>
Code:
<script type="text/javascript" src="{THEME}/js/googleanalytic.js"></script>
 
Give a link to your website where you are facing this problem

Copy the code from google analytics and add it

OR

PHP:
 <script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try{ 
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._trackPageview();
} catch(err) {} 
</script>
 
I have the same issue... but I put the code in the main.tpl also after the <head> and it appears to be working. I am not suffering errors and such.:sun:
 
Status
Not open for further replies.
Back
Top