Re: Simple Google Analytics - Support
Quote:
Originally Posted by
Golden Synergy
Thank you. I downloaded your version.
before I start, I am reading your read me. I found this : Step 4
At the bottom of /includes/templates/[your_template]/common/html_header.php. For the life of me I can not find this html_header. php. All my common folders have tpl_header.php but not "html_header.php
Is that created when I add the -install SQL file?
If your custom template does not have this file then you'll want to copy it from the 'default_template' directory into your custom 'common' directory. Alter that file and you're all set.
Remember, where ever you see 'your_template', replace this with the actual name of your own template directory.
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
BlessIsaacola
I am wondering if you by any chance have an approach you can share that will at least track conversion even if the revenue data is not being tracked. I have tried the conversion code from adcenter and it's not tracking. Here is the code from them that I am currently using:
Code:
<script type="text/javascript"> if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};</script> <script id="mstag_tops" type="text/javascript" src="//flex.atdmt.com/mstag/site/ca8df32c-e586-4f05-8b99-a0fe58e21bd5/mstag.js"></script> <script type="text/javascript"> mstag.loadTag("analytics", {dedup:"1",domainId:"MASKED",type:"1",revenue:"",actionid:"28215"})</script> <noscript> <iframe src="//flex.atdmt.com/mstag/tag/ca8df32c-e586-4f05-8b99-a0fe58e21bd5/analytics.html?dedup=1&domainId=MASKED&type=1&revenue=&actionid=28215" frameborder="0" scrolling="no" width="1" height="1" style="visibility:hidden;display:none"> </iframe> </noscript>
Yes. Take that exact code and put it into the tpl_main_page.php file near the bottom (just above or below the "google analytics" require file.
Insert it as follows to only show on the checkout_success page and you should be ok.
PHP Code:
<?php
/************* bof AdCenter Tracking Code ********************/
if($page_directory == 'includes/modules/pages/checkout_success') { ?>
INSERT YOUR TRACKING CODE HERE
<?php
}
/************* eof AdCenter Tracking Code ********************/
?>
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
Yes. Take that exact code and put it into the tpl_main_page.php file near the bottom (just above or below the "google analytics" require file.
Insert it as follows to only show on the checkout_success page and you should be ok.
PHP Code:
<?php
/************* bof AdCenter Tracking Code ********************/
if($page_directory == 'includes/modules/pages/checkout_success') { ?>
INSERT YOUR TRACKING CODE HERE
<?php
}
/************* eof AdCenter Tracking Code ********************/
?>
Thanks! I will give this a try. I actually have the code currently placed in the checkout_success file and perhaps that's a wrong approach. I wonder how it populates the revenue if there's no variable that's defined for it.
Thanks!
Re: Simple Google Analytics - Support
Since my file Is not matching what your read me said "find the line of code that looks like this:
<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');"
?>
Is the area in red below the line I should replace?
</table>
<?php
/**
* prepares and displays footer output
*
*/
require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');?>
</div>
<!--bof- parse time display -->
<?php
if (DISPLAY_PAGE_PARSE_TIME == 'true') {
?>
<div class="smallText center">Parse Time: <?php echo $parse_time; ?> - Number of Queries: <?php echo $db->queryCount(); ?> - Query Time: <?php echo $db->queryTime(); ?></div>
<?php
}
?>
<!--eof- parse time display -->
<!--bof- banner #6 display -->
<?php
if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
?>
<!--eof- banner #6 display -->
</body>
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
BlessIsaacola
Thanks! I will give this a try. I actually have the code currently placed in the checkout_success file and perhaps that's a wrong approach. I wonder how it populates the revenue if there's no variable that's defined for it.
Thanks!
It will not populate the revenue figure if you do not provide one. To do this you'll need to write more programming code in order to read the order total on the thank you page and insert it into the proper slot within the tracking.
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
Golden Synergy
Since my file Is not matching what your read me said "find the line of code that looks like this:
<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');"
?>
Is the area in red below the line I should replace?
</table>
<?php
/**
* prepares and displays footer output
*
*/
require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');?>
</div>
<!--bof- parse time display -->
<?php
if (DISPLAY_PAGE_PARSE_TIME == 'true') {
?>
<div class="smallText center">Parse Time: <?php echo $parse_time; ?> - Number of Queries: <?php echo $db->queryCount(); ?> - Query Time: <?php echo $db->queryTime(); ?></div>
<?php
}
?>
<!--eof- parse time display -->
<!--bof- banner #6 display -->
<?php
if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
?>
<!--eof- banner #6 display -->
</body>
If you have never installed the module before then your template will not have that line of code. You want to follow the portion of the readme for new installs ... not upgrades. It looks as if you are reading the upgrade section.
You definitely do not want to alter any pre-existing code on the page (especially anything to do with the footer file.) This will likely break the site.
This goes without saying, but before you make any changes, make a BACKUP of all files you are going to alter so you have an easy way of returning to the beginning if you need to.
Re: Simple Google Analytics - Support
Something is very odd for me.
I have moved my shop from a host who ran it on an old version of ZC like 1.3.7 or something to a new host and its running on 1.3.9h.... Looked at analytics and realised that it stopped recording on that very day of change. Then realised I had to put on analytics.. So I have gone ahead and installed SGA.
Its been working fine. Stats going back for years, and then zeros for a little while..
When prodding on the GA website.. I see that there is a old interface and a new beta interface..
In the old interface, there is this green tick showing 'receiving data'... In the new interface, n the tracking code page it says this... 'Tracking Not InstalledLast checked: 09-Nov-2008 12:34:03 PST'... Thats like 3 years ago... So mybe there is a bug in the new interface... No idea how to make it check now that I have installed the code onto my site..
One other thing, bac to the old interface. There are 2 entries for my domain, one current with lots of stats, and one old UA code that was used by a previous company yers ago... But.. That old UA code is also showing as green tick with receiving data... But.. Its not... The old code does not exist in a single place on my zen cart.!! very odd.!!
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
Gertzy
Something is very odd for me.
I have moved my shop from a host who ran it on an old version of ZC like 1.3.7 or something to a new host and its running on 1.3.9h.... Looked at analytics and realised that it stopped recording on that very day of change. Then realised I had to put on analytics.. So I have gone ahead and installed SGA.
Its been working fine. Stats going back for years, and then zeros for a little while..
When prodding on the GA website.. I see that there is a old interface and a new beta interface..
In the old interface, there is this green tick showing 'receiving data'... In the new interface, n the tracking code page it says this... 'Tracking Not InstalledLast checked: 09-Nov-2008 12:34:03 PST'... Thats like 3 years ago... So mybe there is a bug in the new interface... No idea how to make it check now that I have installed the code onto my site..
One other thing, bac to the old interface. There are 2 entries for my domain, one current with lots of stats, and one old UA code that was used by a previous company yers ago... But.. That old UA code is also showing as green tick with receiving data... But.. Its not... The old code does not exist in a single place on my zen cart.!! very odd.!!
None of those interfaces has to do with any of Simple Google Analytics or Zen Cart.
That is all on the Google end (the interface) and is only used to view the Google stats (on the Google end) in either their new interface layout or their old one.
Having said that, if your tracking seems off, my guess is that when the site was upgraded, something was overwritten in how the Simple Google Analytics module sends data to Google.
In short, if you are getting data (don't even worry about the old interface and what any of those account says) in your Google Analytics side, then it should all be ok.
Re: Simple Google Analytics - Support
Hi, I just installed the Simple Google Analytics Mod on my website for the first ime, which is running Zen Cart v1.3.9h. But I'm having a bit of trouble with the customization steps that are listed in the Readme file. In Step 3, Part B where it instructs to insert the given code into the /includes/templates/[your_template]/common/html_header.php directory of the website, I've run into the issue of my site not having a html_header.php file. I'm running the cherry zen template on my site and am wondering how I should proceed with the install from here on? Thanks in advance for any advice anyone can offer.
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
larkin1981
Hi, I just installed the Simple Google Analytics Mod on my website for the first ime, which is running Zen Cart v1.3.9h. But I'm having a bit of trouble with the customization steps that are listed in the Readme file. In Step 3, Part B where it instructs to insert the given code into the /includes/templates/[your_template]/common/html_header.php directory of the website, I've run into the issue of my site not having a html_header.php file. I'm running the cherry zen template on my site and am wondering how I should proceed with the install from here on? Thanks in advance for any advice anyone can offer.
Go find the html_header.php file in the default header common folder, and make a copy of it in your Cherry Zen common folder... then edit it there...