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

Simple Google Analytics - Support

Views: 451,120

Results 1,721 to 1,740 of 2,165
15 Jan 2012, 6:05 AM
#1721
joepixel avatar

joepixel

New Zenner

Join Date:
May 2008
Location:
orlando, florida
Posts:
28
Plugin Contributions:
0

Simple Google Analytics - Support

I managed to get Simple Google Analytics Version: 1.2.5 to work for me on Zen version 1.5 and added to the admin menu. I thought I'd share.

The new GA version does not seem to have a language file to define one of the settings for the admin menu to appear. I created this file: admin/includes/languages/english/extra_definitions/googleanalytics.php and placed the following code in this file:

<?php define('UN_BOX_GOOGLE_ANALYTICS', 'Simple Google Analytics'); Here are the settings I used in the admin registration page. Page Key: Simple Google Analytics Page Name: UN_BOX_GOOGLE_ANALYTICS Page Filename: FILENAME_CONFIGURATION Page Parameters: gID=36 (make sure you look up this in your database because the number will be different. see below on how to do this.) Menu: configuration Display on Menu? Y Sort Order: whatever you want To find the gID number run this select statement in phpMyAdmin: SELECT * FROM `configuration` WHERE configuration_key like '%google%' Then look for the configuration_group_id. This is the number to use after gID= I hope this helps someone!
15 Jan 2012, 7:42 PM
#1722
pinkchalkstudio avatar

pinkchalkstudio

New Zenner

Join Date:
Apr 2008
Posts:
78
Plugin Contributions:
0

Re: Simple Google Analytics - Support

I've been using Simple Google Analytics successfully for over a year. Tracking visitors and conversions.

I recently installed some 3rd party tracking code using the instructions in this ZenCart Tutorial: https://www.zen-cart.com/tutorials/index.php?article=399

The tutorial directs you to create a checkout_success directory under includes/templates/XXXXX/ and place a tpl_footer.php file there. That all worked just fine until I realized that this solution caused my Analytics conversion tracking to stop.

It appears to have disabled the execution of the Simple Google Analytics code on the checkout success page. After investigating and running some tests, just the existence of a tpl_footer.php file under checkout_success causes the conversion tracking to stop (ie same file no 3rd party mods in it).

I found some references to this incompatibility in this thread and took the advice to move my tracking code to includes/templates/XXXXX/common/tpl_main_page.php and deleted the checkout_success override directory and tpl_footer.php in it.

This solved the problem, conversion tracking is working again and my 3rd party tracking code is executing.

I just wanted to share this experience. I don't understand why the incompatibility occurred but I'm very glad to have it all working again!

15 Jan 2012, 9:17 PM
#1723
hfxracing avatar

hfxracing

New Zenner

Join Date:
May 2011
Location:
Nova Scotia
Posts:
39
Plugin Contributions:
0

Re: Simple Google Analytics - Support

I just re-downloaded it I will try it & let you know:clap:

15 Jan 2012, 9:50 PM
#1724
hfxracing avatar

hfxracing

New Zenner

Join Date:
May 2011
Location:
Nova Scotia
Posts:
39
Plugin Contributions:
0

Re: Simple Google Analytics - Support

It Worked like a Charm! the /languages/english/extra_definitions/googleanalytics.php is not in the mod.

After I made that file & then pointed the Admin Register page to the correct place using the ID from the phpadmin it came right up.

So a update will be required on this one to make it really simple for people that know even less then me about php/Sql.
I understand the PCI compliance but I don't have to like it either.

Thank You joepixel & pinkchalkstudio for the help on this one.
:D I just Love Zen Cart! I don't think I would be running a E commerce business without it!

Now to get this puppy set up!

16 Jan 2012, 3:46 PM
#1725
hottrendz avatar

hottrendz

New Zenner

Join Date:
May 2010
Posts:
13
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Thanks Joepixel, I have been looking for a solution for over a week and your solution works.

16 Jan 2012, 11:14 PM
#1726
corygatz avatar

corygatz

New Zenner

Join Date:
Sep 2009
Posts:
71
Plugin Contributions:
0

Re: Simple Google Analytics - Support

hfxracing:

It Worked like a Charm! the /languages/english/extra_definitions/googleanalytics.php is not in the mod.

After I made that file & then pointed the Admin Register page to the correct place using the ID from the phpadmin it came right up.

So a update will be required on this one to make it really simple for people that know even less then me about php/Sql.
I understand the PCI compliance but I don't have to like it either.

Thank You joepixel & pinkchalkstudio for the help on this one.
:D I just Love Zen Cart! I don't think I would be running a E commerce business without it!

Now to get this puppy set up!

This worked like a charm. It took me all day to find it, but it worked! Thanks so much

18 Jan 2012, 3:34 PM
#1727
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

corygatz:

This worked like a charm. It took me all day to find it, but it worked! Thanks so much

I'm currently in the process of looking at this a a few other mods to make sure they are 1.5 compatible. I've got them all working on 1.5 but have noticed that it is not as smooth for others so I'll go back here and rework the areas needed and upload a new version for those looking if needed.

Just wanted to let everyone know.

19 Jan 2012, 2:40 AM
#1728
justmerob avatar

justmerob

New Zenner

Join Date:
Oct 2011
Posts:
16
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Disregard,

Just wasn't patient enough I guess =) Gathering data now =)

Thanks OP and all who made this mod!

19 Jan 2012, 10:06 PM
#1729
armyabn1 avatar

armyabn1

New Zenner

Join Date:
Nov 2009
Posts:
15
Plugin Contributions:
0

Re: Simple Google Analytics - Support

joepixel:

I managed to get Simple Google Analytics Version: 1.2.5 to work for me on Zen version 1.5 and added to the admin menu. I thought I'd share.

The new GA version does not seem to have a language file to define one of the settings for the admin menu to appear. I created this file: admin/includes/languages/english/extra_definitions/googleanalytics.php and placed the following code in this file:

<?php define('UN_BOX_GOOGLE_ANALYTICS', 'Simple Google Analytics'); Here are the settings I used in the admin registration page. Page Key: Simple Google Analytics Page Name: UN_BOX_GOOGLE_ANALYTICS Page Filename: FILENAME_CONFIGURATION Page Parameters: gID=36 (make sure you look up this in your database because the number will be different. see below on how to do this.) Menu: configuration Display on Menu? Y Sort Order: whatever you want To find the gID number run this select statement in phpMyAdmin: SELECT * FROM `configuration` WHERE configuration_key like '%google%' Then look for the configuration_group_id. This is the number to use after gID= I hope this helps someone!

:clap::clap::clap:

Thank you for this!!! I don't know how many hours you saved me of trying to look into this further.....but it is a lot! Worked perfectly.

20 Jan 2012, 11:24 PM
#1730
rjugalbot avatar

rjugalbot

New Zenner

Join Date:
Jan 2012
Posts:
14
Plugin Contributions:
0

Re: Simple Google Analytics - Support

armyabn1:

:clap::clap::clap:

Thank you for this!!! I don't know how many hours you saved me of trying to look into this further.....but it is a lot! Worked perfectly.

I installed it but there is NO Google Analytics in the Configuration menu. What did i miss?

Anybody?

Thanks.

22 Jan 2012, 8:30 PM
#1731
limitless avatar

limitless

Inactive

Join Date:
Jan 2012
Posts:
496
Plugin Contributions:
0

Re: Simple Google Analytics - Support

RJugalbot:

I installed it but there is NO Google Analytics in the Configuration menu. What did i miss?

Anybody?

Thanks.

In ZC 1.5 you need to register the page within the Admin.

First, create the adminXXXXXXXXXXXX/includes/languages/english/extra_definitions/googleanalytics.php page with the following:

<?php 
define('UN_BOX_GOOGLE_ANALYTICS', 'Simple Google Analytics');

Fire up your mysql client (HeidiSQL, phpMyAdmin, etc)
and run the query:

SELECT configuration_group_id FROM configuration WHERE configuration_title like '%google%' LIMIT 1;

If it returns nothing, you didn't run the SQL included with the installer.

Take the resultant # and use that for your gID in the next step.

Now within your carts admin console, go to:

Admin Access Management => Admin Page Registration

Register the page as per the previous posts:

Page Key: Simple Google Analytics
Page Name: UN_BOX_GOOGLE_ANALYTICS
Page Filename: FILENAME_CONFIGURATION
Page Parameters: gID=XXXX
Menu: configuration
Display on Menu? Y
Sort Order: whatever you want

Save it, and refresh your admin console. You should now see it under 'Configuration'.

24 Jan 2012, 3:54 PM
#1733
rjugalbot avatar

rjugalbot

New Zenner

Join Date:
Jan 2012
Posts:
14
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Limitless:

Configuration image stolen from this site:

http://www.zencartmarketing.com/google-analytics-tricks-for-zen-cart/

I was able get the configuration ID in the configuration database using phpMyAdmin.

I added the Simple Google Analytics to the Admin Page Registration using this info:

Page Key: Simple Google Analytics
Page Name: UN_BOX_GOOGLE_ANALYTICS
Page Filename: FILENAME_CONFIGURATION
Page Parameters: gID=49
Menu: Tools
Display on Menu? Y
Sort Order: 0

The menu was added in under Tools. However, when clicked it just shows the My Store configuration.

Thank in advance for any help.

26 Jan 2012, 5:03 PM
#1734
jjj0923 avatar

jjj0923

New Zenner

Join Date:
Nov 2011
Posts:
59
Plugin Contributions:
0

Re: Simple Google Analytics - Support

I do apologize in advance if this question has been posted before in this thread, but I display 100 posts per page and this thread in 18 pages long so the thought of wading through 1,800 posts if not that palatable.

In any event - when I sign up for Googleanalytics it asked me if I want HTTP for my site or HTTPS for the url before I enter the URL.

How do you get one account that handles both since the UA number is dfferent for my http and https web profile.

thanks in advance.

Jeff

30 Jan 2012, 3:55 PM
#1735
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

Is there a reason you have a different tracking number (UA) for the secure vs. non-secure site?

Ideally they should be identical if you want the most accurate tracking.

My suggestion would be to choose one tracking number and use that for the website. If you have multiple websites (with different domains) you can use different tracking numbers (UA) to segment then (and even then, you could technically track multiple domains with the same id if desired.)

30 Jan 2012, 11:19 PM
#1736
jjj0923 avatar

jjj0923

New Zenner

Join Date:
Nov 2011
Posts:
59
Plugin Contributions:
0

Re: Simple Google Analytics - Support

econcepts:

Is there a reason you have a different tracking number (UA) for the secure vs. non-secure site?

Ideally they should be identical if you want the most accurate tracking.

My suggestion would be to choose one tracking number and use that for the website. If you have multiple websites (with different domains) you can use different tracking numbers (UA) to segment then (and even then, you could technically track multiple domains with the same id if desired.)

thanks I got that one figured out. what threw me off was google shows http and https as different choices - then I took at the code they generate and saw the bit about being able to support http and https from the same code.

My other question is this: do I have to define my own sales funnel - I'm guessing yes?

I've done a few transactions earlier today and while basic access stats show up in the analytics code none of my sales have yet.

maybe I need to go back and read all the posts in this thread.

30 Jan 2012, 11:51 PM
#1737
jjj0923 avatar

jjj0923

New Zenner

Join Date:
Nov 2011
Posts:
59
Plugin Contributions:
0

Re: Simple Google Analytics - Support

one thing I have noticed -

a lot of the older thred refer to this code in the bottom of the mail page:

<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?>

I have the following code:

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

I am getting google stats but no sales number and do have my UA code entered in the config screen.

In addition my tpl_main_page.php is in:
/usr/local/websites/mysite/includes/templates/ZCT/common

and my google-analytics directory is located at:
/usr/loca/websites/includes/templates/ZCT/google_analytics

does this look right?

thanks in advance.

2 Feb 2012, 7:24 PM
#1738
beyre avatar

beyre

Zen Follower

Join Date:
Feb 2009
Posts:
422
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Wow! I was really surprised when I went to install this addon on a newly installed ZC 1.5.0 that there was no Google analytics showing under Configuration in Admin. That is a first, as I have installed this addon on previously ZCs with no problems.

I did go back a page in this support thread and noticed the fix. But since me and databases don't get along (I just have to look at myphpAdmin and my database explodes) ... I'll wait for Eric to provide an updated version with the fix.

4 Feb 2012, 5:02 PM
#1739
trastevere avatar

trastevere

New Zenner

Join Date:
Sep 2010
Posts:
4
Plugin Contributions:
0

Re: Simple Google Analytics - Support

A great addon, well written, congratulation to Eric.

I would have however a few suggestions on future releases:

  1. google_conversion_format, google_conversion_color and google_conversion_label are hardcoded - should be editable from admin

  2. Beside checkout_success, to track eventually user signup and/or newsletter subscribers (helpful if you have adwords on)

  3. I think that is no need anymore for the old urchin and ga code. I would clean up the file eliminating the code leaving only the async type. This way this addon would be a truly plug & play, no hacking would be necessary to any template file.

I've made some of these modification to my site and the addon is working great.

6 Feb 2012, 6:06 PM
#1740
dragonlady avatar

dragonlady

Zen Follower

Join Date:
May 2010
Posts:
145
Plugin Contributions:
0

Re: Simple Google Analytics - Support

beyre:

Wow! I was really surprised when I went to install this addon on a newly installed ZC 1.5.0 that there was no Google analytics showing under Configuration in Admin. That is a first, as I have installed this addon on previously ZCs with no problems.

I did go back a page in this support thread and noticed the fix. But since me and databases don't get along (I just have to look at myphpAdmin and my database explodes) ... I'll wait for Eric to provide an updated version with the fix.

Where did you find the fix, please? I've been fighting with this all morning.

My GA numbers seemed to be fine after the upgrade, but they've slowly dropped 'till they are showing ZERO visitors...despite the fact I have plenty of people online, and am getting business-as-usual.

So I downloaded this and installed it, but now there's nothing in the configuration menu; so I'm at a dead end.