Re: Simple Google Analytics - Support
Good point here. This is actually how Google sees it and would be 'correct' to some degree (nothing with the module itself ... more with how Google reads the info).
Here is what I mean:
If you look at it from Google's perspective, there were only "2" unique products (by product id / model) ordered yet there were "3" variations of products in all.
So from Google's end, it reads it as two unique products (which is correct) one of which has '2 variations' (but in fact is the same product as the first.)
Does that make sense?
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
Good point here. This is actually how Google sees it and would be 'correct' to some degree (nothing with the module itself ... more with how Google reads the info).
Here is what I mean:
If you look at it from Google's perspective, there were only "2" unique products (by product id / model) ordered yet there were "3" variations of products in all.
So from Google's end, it reads it as two unique products (which is correct) one of which has '2 variations' (but in fact is the same product as the first.)
Does that make sense?
What you're saying make sense but it's a faulty logic on Google's part. Obviously, if the product ID is the same Google analytic should be smart enough to show the variation.
So in my example, even if google is only reporting one product A, if they are not going to report the variation they should at least count all for that id. So if a customer buys 2 small t-shirt and 2 medium shirt, if Google is only going to report it as a t-shirt the count should be 4 NOT two units.
Oh well!
Re: Simple Google Analytics - Support
Apologies if this has been answered before in this long thread, however...
I created a new page called "main", which has its own "tpl_main_page.php" in \includes\templates\mytemplate\main\ because its layout is different from all other pages.
(Background: This new page was originally the homepage of my old site, but upon migrating the site to zen cart, "index.php" has become the homepage. Wishing to retain the content and layout of the old homepage, I had to create a new page called "main".)
1. Just before the </body> at the bottom of the "main" page, I inserted the following code as instructed:
Code:
<!-- Google Analytics 1-2-3 start-->
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?>
<!-- Google Analytics 1-2-3 end-->
and then removed the "/" before "google_analytics.php".
2. I then placed a copy of "google_analytics.php"
from
includes\templates\mytemplate\google_analytics\
into
\includes\templates\mytemplate\main\
However, while the above throws no errors and because my zen cart is still under development on localhost, I have no idea whether the above actually works on a live site or indeed is the correct way to invoke google analytics for this one page.
Comments/Criticisms most appreciated.
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
dw08gm
Apologies if this has been answered before in this long thread, however...
I created a new page called "main", which has its own "tpl_main_page.php" in \includes\templates\mytemplate\main\ because its layout is different from all other pages.
(Background: This new page was originally the homepage of my old site, but upon migrating the site to zen cart, "index.php" has become the homepage. Wishing to retain the content and layout of the old homepage, I had to create a new page called "main".)
1. Just before the </body> at the bottom of the "main" page, I inserted the following code as instructed:
Code:
<!-- Google Analytics 1-2-3 start-->
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?>
<!-- Google Analytics 1-2-3 end-->
and then removed the "
/" before "google_analytics.php".
2. I then placed a copy of "google_analytics.php"
from
includes\templates\mytemplate\google_analytics\
into
\includes\templates\mytemplate\main\
However, while the above throws no errors and because my zen cart is still under development on localhost, I have no idea whether the above actually works on a live site or indeed is the correct way to invoke google analytics for this one page.
Comments/Criticisms most appreciated.
This is one way to do it. The way to see if it will work is to look at the page on your local server and simply "view source" (from the browser). If you see the Google Analytics code on the page you're all set.
Re: Simple Google Analytics - Support
I have changed templates, what do I need to do to get analytics working again?
Re: Simple Google Analytics - Support
Does anybody know the benefit of using Asynchronous Snippet versus ga.js option? I've read on Google analytics and still not sure what the benefit is even though they are promotion the Asynchronous Snippet method.
Thanks!
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
This is one way to do it. The way to see if it will work is to look at the page on your local server and simply "view source" (from the browser). If you see the Google Analytics code on the page you're all set.
Hi econcepts. Thanks for your prompt reply.
Yes, the code does appear in view source.
On further thought, however, I am wondering how else to access the original google_analytics.php in includes\templates\mytemplate\google_analytics\.
It seems I only need to change the "$current_page_base" in the following code at the bottom of my new tpl_main_page.php to reference /mytemplate/, but which is currently rendering as "main" .
Code:
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . 'google_analytics.php');
Any thoughts or solutions.
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
kolivo
I have changed templates, what do I need to do to get analytics working again?
Follow the install instructions in the readme file (no need to reapply any admin SQL patches.) You'll need to make any code changes (to the tpl_main_page.php, and the html_header.php within your new template and also make sure you copy the "google-analytics" directory to your new template folder as well.
Basically, if you go through the readme and follow the instructions but skip the part about installing the SQL patch, you should be ok.
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
BlessIsaacola
Does anybody know the benefit of using Asynchronous Snippet versus ga.js option? I've read on Google analytics and still not sure what the benefit is even though they are promotion the Asynchronous Snippet method.
Thanks!
Of course they say there are more tracking options with the new snippet (if you know how to find them and activate them in analytics.) One thing they say is the asych tracking loads at the top of the page (instead of the bottom as in the past) which helps a number of tracking issues. It also is apparently 'faster' in loading the way it calls the script etc...
I can say that if you are running any Website Optimizer experiments that having the code at the top of the page will help as often times it is needed to be placed before any Optimizer code on the page.
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
dw08gm
Hi econcepts. Thanks for your prompt reply.
Yes, the code does appear in view source.
On further thought, however, I am wondering how else to access the original google_analytics.php in includes\templates\mytemplate\google_analytics\.
It seems I only need to change the "
$current_page_base" in the following code at the bottom of my new tpl_main_page.php to reference /mytemplate/, but which is currently rendering as "main" .
Code:
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . 'google_analytics.php');
Any thoughts or solutions.
If the code is showing on you page when you view source then you should have to change anything. The tracking is installed correctly.