Totally Zenned
- Join Date:
- Sep 2005
- Posts:
- 836
- Plugin Contributions:
- 0
Google Analytics Integration
download link for this is broke
Views: 225,787
Totally Zenned
download link for this is broke
Totally Zenned
Try the one in the Zen Downloads section. Other Contributions.
Zen Follower
I'd like to add Google Analytics to my Zen cart store. There is a lot of conflicting advice on these forums regarding what is the best policy i.e. insert code yourself or use one of the modules. If module, which one gives the best results? Simple Google Analytics Module?
Totally Zenned
The easiest route is to start with the module available in the downloads section called Simple Google Analytics.
It will help with installing Google Analytics and E-Commerce tracking. However, if you want to install Conversion Tracking, you will need to manually add code to the proper page in order to get it to work.
Also, if you want to utilize Goals and Funnels, you will need to set these up separately from within your Google Analytics account.
Hopefully that helps.
New Zenner
hey guys,
does anyone else get a "Done, but with errors on page." error in IE?
when i had originally installed google analytics on my website (before zen) i ran into the error and google told me to try moving it to the header, before any other javascripts. this fixed the problem, but this mod puts it at the bottom of my zen pages and i'm seeing that familiar error again. any workarounds or advice?
New Zenner
also... when i double click to see the actual error it says "object expected" and refers to line 270 where my code says "urchinTracker ();"
Totally Zenned
It sounds like you might have missed adding the ".js" file to the proper directory for the analytics to start "On Load".
This would give you a js error if you loaded a page and it was given a js command to start an "object" that wasn't present (because it was never defined).
I would check to make sure you have all of the files in place (there should be 2 if you are using the Simple Google Analytics module in the dloads section).
New Zenner
i found that manually adding the code to my tpl_main_page.php and altering it made the error go away. i wonder if it is still working or did i kill it in the process? -i removed the closing and beginning statements from the two pieces of code because they seemed redundant...but i'm an amateur...
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> _uacct = "UA-xxxxxxx-x"; urchinTracker(); </script>Totally Zenned
Make sure that if you manually add the code, that you remove the initial "third party module" as you don't want to have two different tracking codes on the same page like that (at least two of the SAME codes).
Also, did it work because you also removed the "on load" event from the page, and not just because the code was manually added?
I would check that as well.
Lastly, in the code you presented, you are missing a part. The code should look like this on the page (whether you manually enter it or use the module). In your post, it looks like you have combined everything into one .js script.
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-xxxxxx-x"; urchinTracker(); </script>I have performed it both ways on numerous sites (with the add-on and then manually without the add-on) and the only time I ever received an error was when the on load event was not correctly added to the page, or if the code split across multiple lines (when it should have been just on one line in some spots.)
Hope that helps!
New Zenner
yes, i combined it into one script and the error went away. do you think i killed the functionality by combining it?
onload is still there, i just took out the php code from the mod and inserted the google code manually. has removing the onload worked for you in the past?
here's mine...anything funky here?
<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>Totally Zenned
Not sure if you killed it, but I can tell you that it would be best to insert the code exactly as Google gives it (which is split). They have a reason for it I'm sure, and many parts of their tracking are dependent on other parts so, placement might be an issue.
You should not remove the "onload" ability as that is what "activates" the objects needed to run the tracking in the first place.
What I would recommend doing is starting over with it. From the beginning. Use the Simple Google Analytics Module as a foundation, and you should be OK.
There should be no need to manually alter code at all if you install that (unless of course you want to add Conversion Tracking, Goal Tracking, or Funnels).
New Zenner
from what i researched, ie7 is a nightmare regarding this issue. it's the only browser that shows the error so people are just living with it. lots of mainstream online stores get the error... i just hate seeing any errors on the site...
Totally Zenned
Thanks for the update Zack!
Zen Follower
I have analyitcs installed and it seemed to be working. I changed hosting companies and now sales are randomlly registering. E-Commerce is on but sales just aren't showing up. Any idea what could cause this?
Totally Zenned
A few things you could look into:
When you changed hosting companies, did you make sure you moved all the files properly?
How many sales are random? Is it a large amount or small random amount? It would be a long shot, but users who are blocking JavaScript will not be tracked by Google.
Have you run through the checkout process yourself and then did a view source on the "checkout success" page to determine if he code is present, and if it is placed correctly?
These are where I would start to find out "why"?
It shouldn't matter who you host with as long as the code is untouched and in place.
New Zenner
Has anyone successfully integrated / modified Simple Google Analytics to get conversion tracking from Yahoo! PPC Campaigns?
I have Simple Google Analytics up and running, but I can't figure out how to get conversion tracking out to my Yahoo PPC campaigns.
New Zenner
Newbey,
PPC tracking can be accomplished by manually inserting tracking code parameters in your campaign link addresses. These documents may help:
http://www.google.com/support/analytics/bin/answer.py?answer=27282
and
http://www.google.com/support/analytics/bin/answer.py?answer=27255&hl=en
Essentially, your yahoo link would look something like this:
http://www.mywebsite.com/my_yahoo_landing_page.html?utm_source=yahoo&utm_medium=cpc&utm_term=pet_supplies&utm_campaign=MyPetSupplyCampaign
Hope this helps,
New Zenner
Just to be sure this shows up correctly:
http://www.mywebsite.com/my_yahoo_landing_page.html?utm_source=yahoo&utm_medium=cpc&utm_term=pet_supplies&utm_campaign=MyPetSupplyCampaign
Totally Zenned
newbey:
Has anyone successfully integrated / modified Simple Google Analytics to get conversion tracking from Yahoo! PPC Campaigns?
I have Simple Google Analytics up and running, but I can't figure out how to get conversion tracking out to my Yahoo PPC campaigns.
Setup Cross Channel Tracking in your Google Account and that will allow you to track yahoo from within your Google account.
New Zenner
Folks:
I have been using the google analytics module for months now and it has been working great. Then I was trying a bit of affiliate tracking code and deleted the google analytics code form tpl_main_page.php.
Then I put it back.
Now when I run a test transaction I get an error at the bottom of the browser of the checkout_success page that says:
Line: 25
Char: 1
Error: 'Total_Cost' is undefined
Code: 0
URL: https://I-Have-My_URL-Here.com/cart/index.php?
Is this a cache problem?
Do I need to re-install the module?
I know I didn't have the error before because I was on the look-out for that sort of error.
Any words of wisdom?
Thank you,
Brent
Fields marked required must be completed.
Tell staff why this post should be reviewed.