Zen Cart Logo
Forums / All Other Contributions/Addons / Simple Google Analytics - Support

Simple Google Analytics - Support

Views: 451,171

Results 1,461 to 1,480 of 2,165
5 Mar 2011, 1:00 PM
#1461
kcb410 avatar

kcb410

Zen Follower

Join Date:
Dec 2008
Location:
Toronto
Posts:
348
Plugin Contributions:
0

Simple Google Analytics - Support

Hello everyone,

About 10 days ago I switched from the other Analytics mod to Simple Google Analytics using Asynchronous code. Everything seems to be tracking OK except ecommerce which I do have enabled in G Analytics. I've had a couple of purchases since then and I've also made a test purchase but they don't show up.

Is there a period of time after switching to Simple Google Analytics where it won't pick up the transactions or have I done something incorrectly?

Any help is appreciated...thank you.

Zen 139h
PHP 5.2.16
MySQL 5.0.92

7 Mar 2011, 2:54 PM
#1462
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Simple Google Analytics - Support

Minu:

I have installed the Google Analytics by Andrew, but I can't find the support thread for it. Would anybody direct me to the right thread.

Thanks to All

That support thread is here:

http://www.zen-cart.com/forum/showthread.php?t=43907

I haven't seen any support from the original programmer in there given for a while (I've been answering questions in there for people to help them.)

This is the support thread for my module: Simple Google Analytics

7 Mar 2011, 2:55 PM
#1463
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Simple Google Analytics - Support

AshleyNG2:

Thanks for this fix, was a bit boggled by this. I know this post was a while ago but I have made one addition to a popup which was not included and fixed the space in the wordings. I shall highlight the addition in bold.

<?php /* Begin Simple Google Analytics */ if (in_array($current_page_base,explode(",",'popup_image,popup_image_additional,popup_cvv_help,popup_coupon_help,popup_attributes_qty_prices,popup_search_help,popup_shipping_estimator,[B]info_shopping_cart[/B]')) ) { //Skip outputting the tracking code as this is a pop-up window } else { // Print tracking code to page if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") { require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php'); } } // end if for page determination /* End Simple Google Analytics */ ?>

Super thanks!
7 Mar 2011, 3:00 PM
#1464
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Simple Google Analytics - Support

kcb410:

Hello everyone,

About 10 days ago I switched from the other Analytics mod to Simple Google Analytics using Asynchronous code. Everything seems to be tracking OK except ecommerce which I do have enabled in G Analytics. I've had a couple of purchases since then and I've also made a test purchase but they don't show up.

Is there a period of time after switching to Simple Google Analytics where it won't pick up the transactions or have I done something incorrectly?

Any help is appreciated...thank you.

Zen 139h
PHP 5.2.16
MySQL 5.0.92

There should be no period of time to wait unless you weren't tracking ecommerce before. Even then it would be minimal.

Here is a thought for you.

  1. When you uninstalled the other mod (assuming it was Google Anlaytics by Andrew) are you sure you reversed all those changes both in the files and in the database? The tracking in that mod didn't work well with ecommerce for some reason and if you didn't reverse all files changes and remove all files that came with that package, you could have carried over some of those native issues.

I suspect this might be the cause (some overlap in code etc...).

  1. Do you have any type of affiliate tracking activated on your site? If so, which one? There is a work around for the code if this is the case.
7 Mar 2011, 3:08 PM
#1465
kcb410 avatar

kcb410

Zen Follower

Join Date:
Dec 2008
Location:
Toronto
Posts:
348
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Hello Econcepts,

econcepts:

Here is a thought for you.

  1. When you uninstalled the other mod (assuming it was Google Anlaytics by Andrew) are you sure you reversed all those changes both in the files and in the database? The tracking in that mod didn't work well with ecommerce for some reason and if you didn't reverse all files changes and remove all files that came with that package, you could have carried over some of those native issues.

I suspect this might be the cause (some overlap in code etc...).

I'll go through and double check this later today. I thought I got everything.

econcepts:

  1. Do you have any type of affiliate tracking activated on your site? If so, which one? There is a work around for the code if this is the case.

I don't have any affiliate tracking activated that I know of.

Thank you for the reply Econcepts.

Paul

7 Mar 2011, 6:20 PM
#1466
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Simple Google Analytics - Support

kcb410:

Hello Econcepts,

I'll go through and double check this later today. I thought I got everything.

I don't have any affiliate tracking activated that I know of.

Thank you for the reply Econcepts.

Paul

If you don't have any affiliate tracking installed then it is likely that a few files (or files you altered) remain from the previous installation. This would cause tracking to be in accurate.

8 Mar 2011, 9:37 PM
#1467
minu avatar

minu

New Zenner

Join Date:
Dec 2010
Posts:
35
Plugin Contributions:
0

Re: Simple Google Analytics - Support

I am in step 2 of installing the simple Google analytics, but I don't have a file in common called "tpl_main_page.php" I am using ZenCart 1.3.9

any idea?

Thanks and God Bless

9 Mar 2011, 2:54 AM
#1468
kcb410 avatar

kcb410

Zen Follower

Join Date:
Dec 2008
Location:
Toronto
Posts:
348
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Minu:

I am in step 2 of installing the simple Google analytics, but I don't have a file in common called "tpl_main_page.php" I am using ZenCart 1.3.9

any idea?

Thanks and God Bless

Hello,

What is your file path to the folder 'common'?

Are you using the Classic template (standard when zen is installed)?

12 Mar 2011, 10:09 PM
#1469
minu avatar

minu

New Zenner

Join Date:
Dec 2010
Posts:
35
Plugin Contributions:
0

Re: Simple Google Analytics - Support

kcb410:

Hello,

What is your file path to the folder 'common'?

Are you using the Classic template (standard when zen is installed)?

Thanks KCB410;
the common file is in the following path
"includes/template/andover_modern/common"

my template is "andover_modern"

Thanks for your help

12 Mar 2011, 10:33 PM
#1470
kcb410 avatar

kcb410

Zen Follower

Join Date:
Dec 2008
Location:
Toronto
Posts:
348
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Minu:

Thanks KCB410;
the common file is in the following path
"includes/template/andover_modern/common"

my template is "andover_modern"

Thanks for your help

You wouldn't find it there unless you copied it there from its original location. You'll want to download the file from includes/templates/template_default/common make the required changes and upload it to includes/template/andover_modern/common.

You may want to check out this article on setting template overrides.
https://www.zen-cart.com/tutorials/index.php?article=36

17 Mar 2011, 6:19 PM
#1471
melena avatar

melena

New Zenner

Join Date:
Jun 2008
Posts:
71
Plugin Contributions:
0

Re: Simple Google Analytics - Support

I don't have the page /includes/templates/[your_template]/common/tpl_main_page.php, what shall i do? Thanks!

18 Mar 2011, 10:52 PM
#1472
melena avatar

melena

New Zenner

Join Date:
Jun 2008
Posts:
71
Plugin Contributions:
0

Re: Simple Google Analytics - Support

melena:

I don't have the page /includes/templates/[your_template]/common/tpl_main_page.php, what shall i do? Thanks!

yes I have done all the templ
ates override as above and it is still not working!

21 Mar 2011, 1:42 PM
#1473
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Simple Google Analytics - Support

melena:

yes I have done all the templ
ates override as above and it is still not working!

Look a few posts below and you'll find the answer. You need to copy the file tpl_main_page.php from your template_default directory into your custom override template directory and then make adjustments to that. That is how you activate the template overrides.

If you have done this already, make sure you completed step 3 of the install.

If you think you have don all of this, view your site in a browser. While looking at it perform a 'view source'. Look for the Google Analytics tracking code on the page. Make sure it has your proper tracking id showing (if not you need to add that in the Zen Cart admin.)

If all that is in place and it still is not working you need to make sure you tell Google to "check the tracking" on the page so they know you have it in place and can start recording data for you.

Let me know if this helps.

If you provide a URL to the site that would help as well.

Thanks!

24 Mar 2011, 4:44 PM
#1474
gaffettape avatar

gaffettape

Zen Follower

Join Date:
May 2009
Posts:
433
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Hi,

I have been getting quite a few hits and a few sales from google image search. I thought it would be great if I was able track these image searches and see what keywords were being used etc. so I googled it and found this. Would it be possible to implement something like that using this mods "Google Custom Code - After" custom code entry feature?

Thanks :smile:

25 Mar 2011, 2:03 PM
#1475
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Simple Google Analytics - Support

@gafettape,

Yes you can track it with my module by simply adding a few lines of custom code. Version 1.2.4 of my Simple Google Analytics module will let you do this with either the ga,js version or the Asynchronous version of the tracking script. 1.2.3 will only let you do it with the Asynchronous version.

I wrote an article here on how it is done since I noticed many others were also looking for the answer to this. You can read that here: Image Search Keyword Tracking with Google Analytics.

In short, to add the ability of keyword tracking via Google Image Search you first need to determine the type of tracking code you are using.

Once you have determined that, all you have to do is go to the configuration section of my module (Admin > Configuration > Google Analytics Configuration) and in the section that says "Google Custom Code - After" add one of the following snippets (based on the type of tracking you are using):

ga.js users add the following:

var ref = document.referrer;
if (ref.search(/images.google/) != -1 && ref.search(/prev/) != -1) {
var regex = new RegExp("images.google.([^/]+).*&prev=([^&]+)");
var match = regex.exec(ref);
pageTracker._clearOrganic();
pageTracker._addOrganic("images.google."+ match[1],"q");
pageTracker._setReferrerOverride("http://images.google." + match[1] + unescape(match[2]));
}


**Asychronous users add the following:**

> ```php
var ref = document.referrer;
if (ref.search(/images.google/) != -1 && ref.search(/prev/) != -1) {
var regex = new RegExp("images.google.([^\/]+).*&prev=([^&]+)");
var match = regex.exec(ref);
_gaq.push(['_clearOrganic']);
_gaq.push(['_addOrganic','images.google.'+match[1],'q']);
_gaq.push(['_setReferrerOverride', 'http://images.google.'+match[1]+unescape(match[2])]);
}

Save that and now enable the custom tracking by setting the option that says "Add Custom Tracking After Main Analytics Code?" to "Enable".

Refresh your page and view the source to make sure the new tracking is in place.

Let me know how this works for you.

25 Mar 2011, 2:23 PM
#1476
gaffettape avatar

gaffettape

Zen Follower

Join Date:
May 2009
Posts:
433
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Thanks for your detailed response Eric, I'll give it a go sometime today and let you know how I get on.

One question: do I need to add or adjust anything in my Google Analytics account?

Thanks :smile:

26 Mar 2011, 11:36 AM
#1477
hermes369 avatar

hermes369

New Zenner

Join Date:
Dec 2006
Location:
Augusta, GA
Posts:
74
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Still fighting Google... I'm convinced my problem is on the Google side. My client has a user number with Google that's tied to AdSense. Because I'm the one who looks after his site, I created the Analytics account with my user number. Apparently, this makes the Google unhappy.

The next thing is for me to try is to delete my profile for his site and use his. I don't know if anyone else has experienced a similar situation; but, I'll post back if it works.

26 Mar 2011, 1:37 PM
#1478
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Simple Google Analytics - Support

gaffettape:

Thanks for your detailed response Eric, I'll give it a go sometime today and let you know how I get on.

One question: do I need to add or adjust anything in my Google Analytics account?

Thanks :smile:

Not to track what you are looking to do.

26 Mar 2011, 1:39 PM
#1479
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Simple Google Analytics - Support

hermes369:

Still fighting Google... I'm convinced my problem is on the Google side. My client has a user number with Google that's tied to AdSense. Because I'm the one who looks after his site, I created the Analytics account with my user number. Apparently, this makes the Google unhappy.

The next thing is for me to try is to delete my profile for his site and use his. I don't know if anyone else has experienced a similar situation; but, I'll post back if it works.

What problem are you actually experiencing? As long as you use the number associated with their domain profile you should get tracking. It doesn't matter where the account is setup or what it it tied to. The only reason you might want it under their name is so they can access it without needing access to your own account.

26 Mar 2011, 1:40 PM
#1480
gaffettape avatar

gaffettape

Zen Follower

Join Date:
May 2009
Posts:
433
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Thanks for your help Eric, I'll add that code now and let you know how it's going in a few days :smile: