SOLVED Google Tracking


Subject: Google Tracking
I am trying to add my website to Google Tracking for their bots come visiting. They have provided me with a script and suggest that I copy the following code block into every webpage I want to track immediately before the </body> tag.

Code: [Download] [Hide] [Select]
<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">
var pageTracker = _gat._getTracker("UA-1235305-4");
pageTracker._trackPageview();
</script>


So, where do I do this at? I put it at the bottom of the index.php but it is not being seen. Is there another way that I just haven't found yet?

Dave

Subject: Re: Google Tracking
try to add it to overall_header.tpl.

Profile PM  
Subject: Re: Google Tracking
overall_footer would be better... find the </body>tag near the bootom of the file and just at it before...

:mrgreen: :mrgreen:

Subject: Re: Google Tracking
Just to be sure that I add the script to the correct file.

overall_footer.tpl (?)

Subject: Re: Google Tracking
if you are using mg_theme then overall_footer.tpl would be the better file to add it too... as it ask you to add it above the </body> tag..

if you are using another theme then the overall_footer.tpl of that theme

:mrgreen: :mrgreen:

Subject: Re: Google Tracking
Yes I am using mg_themes.

Thank you, I will add the script to overall_footer.tpl

Also, is the a google compatible sitemap? If not, how do I create one?

Subject: Re: Google Tracking
I am not sure about this but I expect you will need to start a new topic so others can see it easily... remember to state clearly your problem in the description of the topic..

:mrgreen: :mrgreen:

Subject: Re: Google Tracking
ok thanks

Subject: Re: Google Tracking
mmm put it in the headers/footers of the ACP

Profile PM  
Subject: Re: Google Tracking
pela wrote: [View Post]
mmm put it in the headers/footers of the ACP


i agree with pela , there u can chose where to show it (header , footer ...in every post ...) and its easy :wink:

Subject: Re: Google Tracking
Limun wrote: [View Post]
pela wrote: [View Post]
mmm put it in the headers/footers of the ACP


i agree with pela , there u can chose where to show it (header , footer ...in every post ...) and its easy :wink:


that is the place where I put my code :lol_flag:

Profile PM  
Subject: Re: Google Tracking
I assume that you are talking about placing the code in templates / mg_themes / overall_header.tpl and templates / mg_themes / overall_footer.tpl through the ACP?

Subject: Re: Google Tracking
christmanrd wrote: [View Post]
I assume that you are talking about placing the code in templates / mg_themes / overall_header.tpl and templates / mg_themes / overall_footer.tpl through the ACP?



i don't know if the ACP change the files .tpl but what i am trying to say is that you can add the code by the configuration from the ACP. Check the lapel "configuration" that said "headers and footers"

Profile PM  
Subject: Re: Google Tracking
Pela:

Thank you for further explaining that to me. I understand it now. :)

Dave


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 1.0224s (PHP: 2% SQL: 98%)
SQL queries: 31 - Debug Off - GZIP Enabled