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

Easy Google Analytics - Support

Views: 13,239

Results 21 to 40 of 43
17 Sep 2015, 8:58 PM
#21
rchoppin avatar

rchoppin

New Zenner

Join Date:
Sep 2014
Location:
chapel hill, nc, usa
Posts:
1
Plugin Contributions:
0

Easy Google Analytics - Support

I have zc 1.5.4 and I installed easy google analytics. I am getting a "ga not found" error on my console. it seems that
it is possible that the ga function has not been loaded by the time it is called OR the correct call is now some
variation on gaTracker. Not sure how to figure out what the problem is.

17 Sep 2015, 10:17 PM
#22
lruskauff avatar

lruskauff

Totally Zenned

Join Date:
Sep 2008
Location:
WA
Posts:
559
Plugin Contributions:
0

Re: Easy Google Analytics - Support

What is your site? What settings did you use in GA set up in the admin?

23 Nov 2015, 1:16 AM
#23
fakedecoy avatar

fakedecoy

Zen Follower

Join Date:
Jul 2006
Posts:
309
Plugin Contributions:
0

Re: Easy Google Analytics - Support

I recently upgraded this plugin to replace the old version from last year. Enhanced Ecommerce isn't working for me. I'm viewing the Shopping Behavior Analysis report and all the numbers are zero except Sessions. Product views, add to cart, checkout, and transactions are zero. Regular Universal Analytics data is still being collected as before the upgrade, including ecommerce transaction data on other reports.

I checked that all the catalog files are in place, and I did all the core files merges.

When I view the page source from a browser, here are the snippets in the source, with account number and widget names sanitized.

This is in my product page HEAD.

            <script type="text/javascript"><!--//
            (function(i,s,o,g,r,a,m) {i['GoogleAnalyticsObject']=r;i[r]=i[r]||function() {
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
            })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
                        ga('create', 'UA-xxxxxx-2', 'auto');
                			ga('require', 'displayfeatures');
						ga('send', 'pageview');
    //--></script>

This is my add to cart button.

<!--bof Add to Cart Box -->
                  <div id="cartAdd">
    Quantity: <input type="text" name="cart_quantity" value="1" maxlength="6" size="4" /><br /><br /><input type="hidden" name="products_id" value="3569" /><input type="image" src="includes/templates/mistik/buttons/english/btn_add_cart_green.gif" alt="Add to Cart" title=" Add to Cart " onClick="_gaq.push(['_trackEvent', 'Cart', 'Add to Cart', 'Product Page']);" />          </div>
  <!--eof Add to Cart Box-->

This is before /BODY.

<!-- ===== Google Enhanced Ecommerce - Product Information ===== -->

<script><!--

  var arrInputTags = document.getElementsByTagName('input');

  var i = 0;
  var sFound = "false";
  var intLength = arrInputTags.length;
  while ((sFound == "false") && (i < intLength)) {
      if (arrInputTags[i].getAttribute("title") == " Add to Cart ") {
          sFound = "true";
      }
      if (sFound == "false") { i++ }
  }
  function geeAddToCart() {

      var myQuantity  = document.getElementsByName('cart_quantity')[1].value.valueOf();

      ga('ec:addProduct', {
          'id'      : '2444',
          'name'    : 'Widget name',
          'price'   : '49.4000',
          'quantity':   myQuantity.valueOf()  
        });
      ga('ec:setAction', 'add');
      ga('send', 'event', 'UX', 'click', 'add to cart');     // Send data using an event.
  }

  if (sFound == "true") {
      arrInputTags[i].addEventListener("click", geeAddToCart);
  }

--></script>

<script><!--
    ga('ec:addProduct', {
        'id': '2444', 
        'name': 'Widget name', 
        'price': '49.4000', 
    });

    ga('ec:setAction', 'detail');

--></script>

What am I missing? Is there something else I need to set up within GA for it to recognize the add to cart actions etc?

23 Nov 2015, 2:43 AM
#24
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Easy Google Analytics - Support

fakeDecoy:

Is there something else I need to set up within GA for it to recognize the add to cart actions etc?

Question: How are we expected to know what you haven't done?

I could suggest that you haven't yet enabled the Enhanced Ecommerce reporting, but you'd probably think I'm an idiot for even making such an obvious suggestion, so I'm not going to. :-)

Cheers
RodG

23 Nov 2015, 3:11 AM
#25
fakedecoy avatar

fakedecoy

Zen Follower

Join Date:
Jul 2006
Posts:
309
Plugin Contributions:
0

Re: Easy Google Analytics - Support

RodG:

Question: How are we expected to know what you haven't done?

I could suggest that you haven't yet enabled the Enhanced Ecommerce reporting, but you'd probably think I'm an idiot for even making such an obvious suggestion, so I'm not going to. :-)

Cheers
RodG

In GA -> View -> Ecommerce Settings, I have "Enhanced Ecommerce Reporting" enabled. Do I need to enter the checkout labeling steps? I'm not sure what to enter there.

I don't see any setting in the Easy GA settings in zc admin.

Are there additional steps? The plugin docs didn't seem to suggest anything.

23 Nov 2015, 3:48 AM
#27
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Easy Google Analytics - Support

fakeDecoy:

In GA -> View -> Ecommerce Settings, I have "Enhanced Ecommerce Reporting" enabled.

As I previous stated, I/we have/had no way of knowing that.

What else don't we know? Well, we don't know that either :-)

fakeDecoy:

Do I need to enter the checkout labeling steps?.

Hmmm... does the word 'optional' mean anything to you. I'd swear that these are clearly indicated as being as such. (Sorry, I really not trying to be a jerk but I seem to have been dealing with an awful lot of stupidity today. Apparently I'm losing my patience).

fakeDecoy:

I'm not sure what to enter there.

Nothing. It is optional <g>

There probably will come a time where you might want to enter data into these fields, but before you can do that you 1st need to identify which 'steps' are being sent to GA by the module that you are using - This can/will even change depending on whether you are using ZenCarts native checkout, or whether you are using something like the FEC module.

The easiest way to identify this info is after you've had the reporting working for a week or two (long enough for GA to accumulate enough data to record the possible steps for your store. You''ll find what you need by navigation to the 'checkout behaviour analysis' section. You should see entries for 'Step 1', Step 2', 'step 3' etc - These are pretty uninformative by themselves, but you should be able to determine that (for example) ' Step#1' is when the login page is loaded, 'Step#2' could be when the checkout page is loaded, Step#3 could be the payment page, and finally, step#5 the order confirmation page.

When identified you can then go back into the 'checkout labeling steps' and enter this more informative information.

fakeDecoy:

I don't see any setting in the Easy GA settings in zc admin.

Are there additional steps? The plugin docs didn't seem to suggest anything.

Disclaimer: I've never installed or used the EasyGA module so I can't comment on its settings or what it doesn't report to the GA servers.

I created my own GA module that does the ec_tracking and the only setting IT has (or needs) is the Google userID. It is quite possible that Easy GA may have settings to enable.disable the ec_ tracking (and/or parts thereof) and that could possible be the problem, but as with my opening comments, we don't know what your settings are - assuming there are some that may be relevant.

From Googles' side of things, what I can tell you is that enabling the "Enhanced Ecommerce Reporting" option is the only thing that needs to be done to make things work.

If you have only done this very recently, please be aware that it can take a couple of days before you'll see any results. Perhaps all you need is to be a little patient? (says the impatient one)

Cheers
RodG

23 Nov 2015, 3:58 AM
#28
fakedecoy avatar

fakedecoy

Zen Follower

Join Date:
Jul 2006
Posts:
309
Plugin Contributions:
0

Re: Easy Google Analytics - Support

Well, the help page I referenced shows several things that are needed, and this plugin doesn't have any of them. What it has isn't even right. The notes on the plugin says that enhanced ecommerce reporting was enabled earlier this year, and the plugin was just updated 2 months ago. So I don't know, maybe the author meant to add it but never really did.

23 Nov 2015, 4:13 AM
#29
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Easy Google Analytics - Support

fakeDecoy:

Also, this page mentions the below line is needed in the HEAD, but I don't see it used in the plugin. Nowhere in the file contents. I might just try adding it and see what happens.
https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce

ga('require', 'ec');


Yes.  It needs the 'ec' extension else it won't work.    

That did actually cross my mind, but I saw in your code example

ga('[B]ec[/B]:setAction', 'detail');

....which implied that the ```
ga('require', 'ec');
``` ...would probably have been already coded into the module.  

FWIW, one of the reasons I created my own module for this is because I'd noticed that the existing tracking modules all needed some sort of code modifications for them to function, and at the time I was teaching myself a little more about the ZenCart notification system, and I came to realise that I could create a tracking module using this technique without having to modify existing code.  

It was developed as a 'proof of concept', but was found to be quite a good/useful idea, so I tidied it up a little and uploaded it to the ZenCart addons.  <https://www.zen-cart.com/downloads.php?do=file&id=1997> 

I'm NOT going to suggest you replace Easy GA with ec_analytics though.   Firstly because I think Easy GA tracks a few more things (by default) than the ec_analytics, and secondly, although both modules will function together quite nicely, there is the possibility that some things will end up being recorded twice, which isn't good for analytical purposes (having said that, Google itself seems to do an excellent job of avoiding such duplication).  

The *only* reason I'm mentioning ec_analytics is if, for any reason you can't get Easy GA to record what you need, then ec_analytics may be an easy solution  (easy in that no code changes needed - just upload the files (nothing gets overwritten), provide the google userID, and it just works.   No mess, no fuss, no configuration needed. 
Removal is just as easy as the install.  

Final note: My previous comment about taking a couple of days to see the results (after enabling the reporting) may still apply with your addition of the ga/require.   IOW, as you've only just added that, if you aren't seeing immediate results, you'll still need to wait for enough data to be accumulated for any reports to show. 

Cheers
RodG
23 Nov 2015, 4:31 AM
#30
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Easy Google Analytics - Support

fakeDecoy:

Well, the help page I referenced shows several things that are needed

STOP: Please note that the page you referenced is a help page for developers.

There shouldn't be anything there that you (as an end user) would need to know to make the module functional. If there was, then that same information would surely have been replicated in the 'readme' or instruction notes for the module itself.

fakeDecoy:

shows several things that are needed, and this plugin doesn't have any of them.

I can't comment about not having any of them (if true, it simply won't be able to track any sales. Period), but it wouldn't surprise me if it doesn't have all of what the page discusses. Even the ec_analytics only supports a subset of what is possible (Perhaps the most notable feature lacking is the tracking of refunds - which I intentionally avoided because I'm a little concerned that without special handling, submitting this data would reveal the the URL of the admin section of the store. The risk may be small, but if anyone wonders why I didn't add this, that is the reason).

fakeDecoy:

What it has isn't even right. The notes on the plugin says that enhanced ecommerce reporting was enabled earlier this year, and the plugin was just updated 2 months ago. So I don't know, maybe the author meant to add it but never really did.

You will need to wait until another Zenner (that does use the easyGA) to comment further on this. It really is something I know absolutely nothing about.

Cheers
RodG

29 Nov 2015, 7:18 PM
#31
fakedecoy avatar

fakedecoy

Zen Follower

Join Date:
Jul 2006
Posts:
309
Plugin Contributions:
0

Re: Easy Google Analytics - Support

So the Enhanced Ecommerce started working after all.

I ran into a bug - The product page is giving this error when I click on a link to a product I disabled. The first line is expected. How do I get rid of the SQL error?

Sorry, the product was not found.
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/ EOF Easy Google Analytics module pt1 from (zen_pro' at line 2
in:
[select p.products_id, p.products_image, pd.products_name, p.master_categories_id ,pd.products_description // EOF Easy Google Analytics module pt1 from (zen_products p left join zen_specials s on p.products_id = s.products_id left join zen_products_description pd on p.products_id = pd.products_id ) where p.products_id = s.products_id and p.products_id = pd.products_id and p.products_status = '1' and s.status = 1 and pd.language_id = '1']
30 Nov 2015, 1:33 AM
#32
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Easy Google Analytics - Support

fakeDecoy:

So the Enhanced Ecommerce started working after all.

I ran into a bug - The product page is giving this error when I click on a link to a product I disabled. The first line is expected. How do I get rid of the SQL error?

Sorry, the product was not found.
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/ EOF Easy Google Analytics module pt1 from (zen_pro' at line 2
in:
[select p.products_id, p.products_image, pd.products_name, p.master_categories_id ,pd.products_description[B] // EOF Easy Google Analytics module[/B] pt1 from (zen_products p left join zen_specials s on p.products_id = s.products_id left join zen_products_description pd on p.products_id = pd.products_id ) where p.products_id = s.products_id and p.products_id = pd.products_id and p.products_status = '1' and s.status = 1 and pd.language_id = '1']


See the code snipped I've highlighted?   Remove it.   (PHP comments don't work inside SQL queries) 

Cheers
RodG
30 Nov 2015, 3:03 AM
#33
fakedecoy avatar

fakedecoy

Zen Follower

Join Date:
Jul 2006
Posts:
309
Plugin Contributions:
0

Re: Easy Google Analytics - Support

Yep, that was it. Fixed, thanks!

24 Jan 2016, 9:46 AM
#34
matteowang02 avatar

matteowang02

New Zenner

Join Date:
Apr 2015
Posts:
5
Plugin Contributions:
0

Re: Easy Google Analytics - Support

I need help. I have zc 1.54 with Easy Google Analytics 2.4.8. But it seems to me the "AdWords Conversion Tracking" is not activated. Below there screenshot of my set Easy Google Analytics.

Attachment 16005

Can anyone let me know, I went wrong it?

Thank you

9 Feb 2016, 12:59 PM
#35
marton_1 avatar

marton_1

Totally Zenned

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

Re: Easy Google Analytics - Support

sapir39:

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?

I have the same problem "In my logs; Unterminated comment starting line 409 in google_analytics/google_analytics.php"

I down loaded the latest easy-numinix-google_analytics-2_4_8 but this also has in line 409  "/*
OLD CODE Prior to 2.2.0"  with no comment termination.

I can get rid of the warning by adding a comment terminator in line 451 BUT have I commented out any code that I need?

Thanks
8 Jun 2016, 8:41 PM
#36
marton_1 avatar

marton_1

Totally Zenned

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

Re: Easy Google Analytics - Support

For a while now when customers pay by Paypal the sale is attributed to a referral by Paypal rather than, for example, "paid search" or "organic search".

10 Jun 2016, 10:58 AM
#37
marton_1 avatar

marton_1

Totally Zenned

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

Re: Easy Google Analytics - Support

marton_1:

For a while now when customers pay by Paypal the sale is attributed to a referral by Paypal rather than, for example, "paid search" or "organic search".

I am planning to upgrade to 1.5.5 soon; seems a good time to move to Simple Google Analytics as support is a litle quiet here?

13 Jun 2016, 3:39 PM
#38
econcepts avatar

econcepts

Totally Zenned

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

Re: Easy Google Analytics - Support

Marton,

There are some native issues with the Easy Google Analytics mod.

If you want a copy of the most recent Simple Google Analytics mod contact me and I'll get you one. I am the original author of that plugin. The one listed in the Zen Forums has been changed by a lot of people. I created the original version of it years ago and have been updating it since then. The copy on my end here has not yet been released (but I install it on servers for those that are looking for it.) It has a ton of features not offered in any of the other Google Analytics mods yet is still simple to use (as was in the earlier releases.)

I'll be hopefully posting this updated version to the internet on my site soon. But until then, I'm installing it myself for those looking for it.

Eric

19 Jun 2016, 9:21 AM
#39
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:

Marton,

There are some native issues with the Easy Google Analytics mod.

If you want a copy of the most recent Simple Google Analytics mod contact me and I'll get you one. I am the original author of that plugin. The one listed in the Zen Forums has been changed by a lot of people. I created the original version of it years ago and have been updating it since then. The copy on my end here has not yet been released (but I install it on servers for those that are looking for it.) It has a ton of features not offered in any of the other Google Analytics mods yet is still simple to use (as was in the earlier releases.)

I'll be hopefully posting this updated version to the internet on my site soon. But until then, I'm installing it myself for those looking for it.

Eric

Yes please do send me the link or sw. :yes:

Many thanks

Marton

4 Aug 2016, 8:01 PM
#40
idc1 avatar

idc1

Zen Follower

Join Date:
Jul 2011
Posts:
139
Plugin Contributions:
0

Re: Easy Google Analytics - Support

Sorry if this is a bit vague, but I hope to get some direction.

Background: We had our site upgraded from 1.3.9h to 1.5.5 To the best of my knowledge this was a fresh install with Easy Google Analytics 2.4.8 added. The same settings are in place as were with the old 1.3.9h w/Simple Google Analytics.

Issue: We are not receiving any data to speak of when signed into our Google account. There was a day when a few hits appeared but all other days are flat lined. The hits do not coincided with the orders we receive. There are no error files pertaining to this in the log. I have reviewed the files and it appears everything is loaded correctly. I know that contradicts this.....when signed into Google, it states "Missing Tracking Code....page is missing valid tracking code."

One change I did make about 30 minutes ago (so I don't know if this is the fix) but I enabled Enhanced Ecommerce Settings in Google.

Are there any suggestions on what may be broke that I can fix and move forward with this plugin, or do I need to look at uninstalling and pursuing econcepts plugin?

Thanks