Zen Cart Logo
Forums / General Questions / I Don't Have A tpl_main_page.php - Where Do I Install Analytics?

I Don't Have A tpl_main_page.php - Where Do I Install Analytics?

Views: 1,504

Results 1 to 4 of 4
27 Apr 2011, 1:17 PM
#1
weisdaclick avatar

weisdaclick

New Zenner

Join Date:
Mar 2011
Posts:
42
Plugin Contributions:
0

I Don't Have A tpl_main_page.php - Where Do I Install Analytics?

I have read many threads but I can't find the answer to this.

My template does not have a /includes/template/custom_template/common/tpl_main_page.php

All I have is:

html_header.php
tpl_columnar_display.php
tpl_footer.php
tpl_footer_menu.php
tpl_header.php
tpl_header.php.bk

I have tired a few files, nothing seems to work.

Perhaps someone can point me to the right file?

27 Apr 2011, 1:24 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: I Don't Have A tpl_main_page.php - Where Do I Install Analytics?

Custom templates only have copies of files that need to be modified from stock for them. There is a base copy of every template file in /template_default/; copy the file you need (/includes/templates/template_default/common/tpl_main_page.php) and save it as /includes/templates/your_template/common/tpl_main_page.php, then add the analytics code to that.

27 Apr 2011, 7:32 PM
#3
weisdaclick avatar

weisdaclick

New Zenner

Join Date:
Mar 2011
Posts:
42
Plugin Contributions:
0

Re: I Don't Have A tpl_main_page.php - Where Do I Install Analytics?

Ok if I'm getting this right....

I copied template_default/common/tpl_main_page.php to includes/templates/my_template/common/tpl_main_page.php and inserted the analytics code into that file.

Analytics says tracking is not installed but here is the bottom of my home page source which looks ok to me (or did I mess up)?

<!--bof-ip address display --> <!--eof-ip address display --> <!--bof-banner #5 display --> <!--eof-banner #5 display --> </div> <!--bof- parse time display --> <!--eof- parse time display --> <!--bof- banner #6 display --> <!--eof- banner #6 display --> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-9569526-8']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </body> </html>
29 Apr 2011, 1:41 PM
#4
weisdaclick avatar

weisdaclick

New Zenner

Join Date:
Mar 2011
Posts:
42
Plugin Contributions:
0

Re: I Don't Have A tpl_main_page.php - Where Do I Install Analytics?

After 24 hours the ! turned into a tick - looks like that worked.

Thanks :clap: