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

Easy Google Analytics - Support

Views: 13,239

Results 1 to 20 of 43
28 Jul 2014, 3:11 PM
#1
kamion avatar

kamion

New Zenner

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

Easy Google Analytics - Support

Since there isn't an Easy Google Analytics (2.1.5) thread, I'm starting one here.

I'm on ZenCart v1.5.1. I was previously using Simple Google Analytics (1.2.6).

In includes/templates/<your template>/common/html_header.php, there's this line:

/**
 * include content from all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically.
 * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
 */
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value); echo "\n";
  }

This seems to included the includes/templates/<your template>/jscript/jscript_google_analytics.php which will include google_analytics.php already.

So the additional line in tpl_main_page.php is redundant...

<?php 
if (GOOGLE_ANALYTICS_TRACKING_TYPE != "Asynchronous") {
	require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>

My question is, should one of it be removed?

29 Jul 2014, 5:16 AM
#2
kamion avatar

kamion

New Zenner

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

Re: Easy Google Analytics - Support

Ok, I think I've figured it out.

Originally, the code for includes/templates/<your template>/jscript/jscript_google_analytics.php in Simple Google Analytics was:

<?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,popup_print_invoice')) ) {
	//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(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
	}
  } // end if for page determination
/* End Simple Google Analytics */
?>

In the Easy Google Analytics, the inner if condition was changed to:

    if(GOOGLE_ANALYTICS_ENABLED == "Enabled"){
      require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
    }

I think this change could be wrong. It should still be the same as in Simple Google Analytics where it tests (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous").

This is because the additional code in includes/templates/<your template>/common/tpl_main_page.php is testing for (GOOGLE_ANALYTICS_TRACKING_TYPE != "Asynchronous"):

<?php 
if (GOOGLE_ANALYTICS_TRACKING_TYPE != "Asynchronous") {
  require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
5 Aug 2014, 4:07 PM
#3
econcepts avatar

econcepts

Totally Zenned

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

Re: Easy Google Analytics - Support

I've noticed a number of tracking problems when I tested the Easy Google Analytics. The way it is setup, it won't track a number of important items so you lose functionality of what is in Simple Google Analytics. The new version of Simple Google Analytics that I have here has altered a few ways tracking works and includes some new features that Google allows. In addition, the newest Simple Google Analytics version is built into the Ecommerce Amplifier framework which is built to house a few other tools that help store owners make more money with their site. (And save money in the case of Google Adwords: PPC).

6 Aug 2014, 1:56 AM
#4
kamion avatar

kamion

New Zenner

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

Re: Easy Google Analytics - Support

Please describe what's missing.

9 Oct 2014, 9:57 PM
#5
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Easy Google Analytics - Support

Hi

I was over in the simple google analytics thread and took your advice to upgrade to easy google analytics.
A couple of questions!
I do not have a "documentation" folder in V1.5.0. Where do I upload \documentation\css and \documentation\images?

I put \documentation\js in catalog/includes/templates/classic/js, Is this OK?

I have a critical error when I run the Tag checker, No HTTP response - see picture.

I also enclose a picture of my configuration.

Thanks for any help!

11 Oct 2014, 8:41 AM
#6
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Easy Google Analytics - Support

Figured out I do not need to upload the "documentation" stuff to my web site it is just part of the installation instructions.

Played around with my configuration and it works now.

12 Oct 2014, 10:58 PM
#7
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Easy Google Analytics - Support

The google tag checker now shows "no errors" but something is not correct.

For example if my Zen cart Counter history shows for a day 100 - 200;the Google Analytics shows 50 users and 100 sessions.

13 Oct 2014, 9:02 PM
#8
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Easy Google Analytics - Support

About "if my Zen cart Counter history shows for a day 100 users - 200 pages; the Google Analytics only shows 50 users and 100 sessions."

I checked my tags on every shop page with the Google Chrome tag checker and no errors found.

I enclose a copy of my configuration for comment.

The installation is automated and I did not get any errors during installation. So where should I look for this problem?

13 Oct 2014, 10:37 PM
#9
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Easy Google Analytics - Support

I realise the report for adwords paid searches is almost correct; just one different between the adwords campaign report and the analytics report of paid searches.
Does this help to point to the cause?

7 May 2015, 6:26 PM
#10
simpledomaining avatar

simpledomaining

New Zenner

Join Date:
May 2011
Posts:
89
Plugin Contributions:
0

Re: Easy Google Analytics - Support

Hello. I have zc 1.5.4 with 2.1.6 easy google analytic installed. using universal tracking type. Everything works except E-commerce tracking. Is this plugin suppose to be tracking e-commerce sales at all? if yes then can someone explain please how to achieve this. On my previous zc version when i had simple google analytics everything was working properly with no headache. help please.

7 May 2015, 10:55 PM
#11
simpledomaining avatar

simpledomaining

New Zenner

Join Date:
May 2011
Posts:
89
Plugin Contributions:
0

Re: Easy Google Analytics - Support

i found no way to edit my post so i will add here. i looked at real time analytics, while the purchase was made on my site, it seems like it tracks everything, except checkout_success. do i need to add something there manually?

11 May 2015, 11:02 AM
#12
sapir39 avatar

sapir39

New Zenner

Join Date:
Apr 2015
Location:
Israel
Posts:
23
Plugin Contributions:
0

Re: Easy Google Analytics - Support

I have zc version 1.5.4 and I installed the easy google analytics however it doesn't seem to work, when I log in to my google analytics I don't receive any data at all. I'm new to zc so I don't even know where to start looking in to it in order to find the problem and fix it. If anyone here had a similar problem or knows where I should start looking it would really help.
Thanks..

11 May 2015, 11:11 AM
#13
sapir39 avatar

sapir39

New Zenner

Join Date:
Apr 2015
Location:
Israel
Posts:
23
Plugin Contributions:
0

Re: Easy Google Analytics - Support

In my logs I get this:

PHP Warning:  Unterminated comment starting line 409 in /home/addvant/public_html/addvant_il_154/includes/templates/westminster_new/google_analytics/google_analytics.php on line 409

:( Does anybody know what I should do?

11 May 2015, 11:22 AM
#14
sapir39 avatar

sapir39

New Zenner

Join Date:
Apr 2015
Location:
Israel
Posts:
23
Plugin Contributions:
0

Re: Easy Google Analytics - Support

It wasn't that the file ended with a comment that wasn't closed.. I closed it but it didn't help..

14 May 2015, 2:46 PM
#15
econcepts avatar

econcepts

Totally Zenned

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

Re: Easy Google Analytics - Support

I know you mentioned that you closed the comment string and that didn't appear to be it.

That error typically does mean an opening comment was not closed. Can you post what the line of code looks like now that you 'closed it' to make sure all looks ok?

Could it be that the file referenced refers to another file that potentially has issues?

17 May 2015, 8:37 AM
#16
sapir39 avatar

sapir39

New Zenner

Join Date:
Apr 2015
Location:
Israel
Posts:
23
Plugin Contributions:
0

Re: Easy Google Analytics - Support

econcepts:

I know you mentioned that you closed the comment string and that didn't appear to be it.

That error typically does mean an opening comment was not closed. Can you post what the line of code looks like now that you 'closed it' to make sure all looks ok?

Could it be that the file referenced refers to another file that potentially has issues?

Thanks, I had already managed to fix the problem. Turns out I have UA and I set to ga. Additionally I didn't realize the plugin will insert the code I received from google automatically so I inserted it. Once removed and after I changed the settings to UA everything seams to be working fine.

18 May 2015, 1:07 PM
#17
econcepts avatar

econcepts

Totally Zenned

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

Re: Easy Google Analytics - Support

Glad you got it fixed!

19 Aug 2015, 2:46 PM
#18
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Easy Google Analytics - Support

When I check my Organic Search channel I usually get the message "Keyword (not provided)", sometimes but not often I see a real keyword or two.
Is this a feature or something I can fix?

I have V1.5.1 and classic template.

Thanks

19 Aug 2015, 5:29 PM
#19
econcepts avatar

econcepts

Totally Zenned

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

Re: Easy Google Analytics - Support

marton_1:

When I check my Organic Search channel I usually get the message "Keyword (not provided)", sometimes but not often I see a real keyword or two.
Is this a feature or something I can fix?

I have V1.5.1 and classic template.

Thanks

This is something that is completely controlled on Google end and is no function of any tracking module (because it is controlled on Google's end). It's for privacy reasons and works like this:

When a user is logged into their Google Account and actively searches the internet, Google does NOT track their search habits. However, when they are not logged into their Google Account it does (that is when you see the keywords).

There are filters I usually set on all my client's Google accounts that can give you great insight and better detail to those pesky "not provided" listings though (which basically are no help at all in determining what your visitors searched on.)

Hopefully that helps a bit.

20 Aug 2015, 7:22 AM
#20
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Easy Google Analytics - Support

econcepts:

This is something that is completely controlled on Google end and is no function of any tracking module (because it is controlled on Google's end). It's for privacy reasons and works like this:

When a user is logged into their Google Account and actively searches the internet, Google does NOT track their search habits. However, when they are not logged into their Google Account it does (that is when you see the keywords).

There are filters I usually set on all my client's Google accounts that can give you great insight and better detail to those pesky "not provided" listings though (which basically are no help at all in determining what your visitors searched on.)

Hopefully that helps a bit.

Thanks for your lightening quick answer.

Seems to be a trick by Google to favour people who pay for adwords, if the customer clicks on an adword advt. then I see the exact search term; if they click on a relevant link provided by Google then I do not see the search term (mostly). :)