Zen Cart Logo
Forums / General Questions / Google Analytics

Google Analytics

Locked

Views: 3,159

Results 1 to 20 of 26
This thread is locked. New replies are disabled.
6 Jun 2009, 6:03 AM
#1
muah avatar

muah

Zen Follower

Join Date:
Dec 2008
Location:
USA, North East
Posts:
226
Plugin Contributions:
0

Google Analytics

I realize that there are other threads talking about “Google analytics” but it seems to me that quite a few people are still confused. I know I still don’t have an answer. I read that the java should be placed in this file: includes/templates/my template name/common/tpl_main_page.php

I entered it and it seems to be working, I’ll know in a day or two for sure. Is it tracking the data that needs to be tracked..?? However…

Why would java script be entered in the main page php when the docs that come with Zen speak of entering Java universally and the directions conflict with the above approach.

Since Zen cart is for e-commerce and since Google is the biggest PPC company out there, I’m going to guess that someone on the Zen Team has already addressed this issue—I just cannot find the thread. Any help?

I know Google and most SEO companies provide no instruction. If you search Google analytics help site and the web, you’ll see scores of Zen cart users asking the same question. I wonder if the Zen team is aware of this major problem troubling so many users?

Does anyone know where the authoritative answer is located?

Thanks much…

:clap:

6 Jun 2009, 8:58 AM
#2
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Google Analytics

I got to the same place as you.

Inserting the code into tpl_main_page seems like the obvious solution. The code appears on all the pages and I am tracking stuff fine.

So far so good.

I am interested to see what other answers you get. I haven't yet had an answer when I asked the question a few days ago on the thread that concerns the Google Analytics Mod. Which to me seems like a very involved way of doing it. But maybe the mod solves somes problems I haven't reached yet. Perhaps URL rewriting?

Nik

7 Jun 2009, 1:31 AM
#3
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,290
Plugin Contributions:
39

Re: Google Analytics

The Java Script folder to include JS in your Zen Cart automatically is to place scripts in the <head> whereas your Google Analytics wants to live in the <body> right above the body tag =-)

~Melanie

7 Jun 2009, 8:37 AM
#4
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Google Analytics

I think you probably made a typo on that. Just above the </body> tag was what you meant. That way the page loads if the GA script dies.

That is why I have always put the GA code in tpl_main_page. When i saw the mod it made me wonder if I had been missing something.

7 Jun 2009, 1:07 PM
#5
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,290
Plugin Contributions:
39

Re: Google Analytics

Yep, that correct... typo:blush:

In any case, some have said that the script can go anywhere.... Google says right above the </body>

A few months ago we were troubleshooting a loss of conversion data for a large Adwords client. At that time Google claimed that the script HAS TO be above the </body> tag.

Mind you, his was and still we see some data loss.

~Melanie

7 Jun 2009, 2:00 PM
#6
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Google Analytics

mprough:

Yep, that correct... typo:blush:

In any case, some have said that the script can go anywhere.... Google says right above the </body>

A few months ago we were troubleshooting a loss of conversion data for a large Adwords client. At that time Google claimed that the script HAS TO be above the </body> tag.

Mind you, his was and still we see some data loss.

~Melanie

Well, I have had the idea that the Google code isn't flawless. So, it's nice to have someone more experienced confirm that. (Having said that for a free service it is pretty amazing.)

All the more reason to bung the script at the bottom of the page where it can do least damage. Despite what the SEO and metrics gurus say the most important thing is to get the page in front of customers. What's the point of knowing that x number of people have visited if they have all bounced because a bit of javascript has messed up the page? Except of course the analytics will tell you they have all bounced and then you can sort it out - there's a circular argument in there somewhere :smile:

Nik

8 Jun 2009, 11:29 PM
#7
muah avatar

muah

Zen Follower

Join Date:
Dec 2008
Location:
USA, North East
Posts:
226
Plugin Contributions:
0

Re: Google Analytics

Howdy,

OK, so the tracking is working...except that the sales made are not showing up in the reports. I'm seeing hits. I'm seeing products viewed. I'm seeing all sorts of stuff...time spent on page. But the most important stuff...sales!!! is missing. Heck, I"m even getting which search engine or PPC company sent the customer in...but no sales being tracked.

There is more to it, more code that needs to be added. Google says go to zen-cart.com and the instructions are there.

Where are the additional instructions? Putting the java code is step one. Getting sales tracking requires tweaks to the page after a sale is made or in the shopping cart page.

9 Jun 2009, 1:29 AM
#9
muah avatar

muah

Zen Follower

Join Date:
Dec 2008
Location:
USA, North East
Posts:
226
Plugin Contributions:
0

Re: Google Analytics

I'll try it...thank you.

Website URL: http://mydomainname.com

However, my shopping cart is in a folder. I prefer the index.html to be free, so that I can put up a sales message. They click, and go to the domainname/zencart

Should my domain name remain as above or should I direct it to the folder? Any clue?

Default page [?] : index.html

Therefore, is my defult page the index.html or should I redirect it to the index.php within the shopping cart?

Exclude URL Query Parameters: zenid

E-Commerce Website: Yes
Site Search [?] : Don't Track Site Search

I prefer to track searches. But it asks for parameters? Any help with that? no clue.

Also, what is a bounce rate?

You should post your answer within the google help section...it'll will surely bring the attention of many, I'm sure. No one else is answering these questions.

9 Jun 2009, 3:25 AM
#10
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,290
Plugin Contributions:
39

Re: Google Analytics

Should my domain name remain as above or should I direct it to the folder? Any clue?

Default page [?] : index.html

This is whatever index you are using in public_html or root... so index.html, index.php, index.htm.... whatever it is.

I prefer to track searches. But it asks for parameters? Any help with that? no clue.
This is rather challenging to set up for Zen Cart, there is a module to track them in your Zen Cart admin... much easier. http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=702

Also, what is a bounce rate?
A bounce is a unique visit under 30 seconds.

Cheers,
Melanie

10 Jun 2009, 10:14 PM
#11
hoboesq avatar

hoboesq

New Zenner

Join Date:
Apr 2009
Posts:
1
Plugin Contributions:
0

Re: Google Analytics

I read the tutorial in #8 and it mentions to hard code or the use of the Zen Cart Module.
Which is the preferred/better of the 2 methods?

11 Jun 2009, 4:43 PM
#13
muah avatar

muah

Zen Follower

Join Date:
Dec 2008
Location:
USA, North East
Posts:
226
Plugin Contributions:
0

Re: Google Analytics

I followed everything to a "T" and I am still not getting conversion tracking. Sales are taking place on a daily basis...none of it showing up.

11 Jun 2009, 5:19 PM
#14
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,290
Plugin Contributions:
39

Re: Google Analytics

Got a link? Some templates have some strange issues with the conversion code in checkout success.

~Melanie

11 Jun 2009, 9:28 PM
#15
muah avatar

muah

Zen Follower

Join Date:
Dec 2008
Location:
USA, North East
Posts:
226
Plugin Contributions:
0

Re: Google Analytics

Oh...I think I got it. I need to set up an "action" and then create a code for that action and put it on the page following the purchase..on the "thank you" page.

Now I'm trying to find this thank you page. Google tells me to put this before the body tags but this page has no body tags. I'm using the file found under checkout_success.

12 Jun 2009, 12:46 AM
#16
muah avatar

muah

Zen Follower

Join Date:
Dec 2008
Location:
USA, North East
Posts:
226
Plugin Contributions:
0

Re: Google Analytics

Anyone have a clue which file to add the "action" code to? It's supposed to target the page following a purchase..the "Thank You" page.

12 Jun 2009, 1:08 AM
#17
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Google Analytics

muah:

Anyone have a clue which file to add the "action" code to? It's supposed to target the page following a purchase..the "Thank You" page.

Have not tested but I would think you would add the code to:
/includes/languages/english/html_includes/define_checkout_success.php

If your template is using a over ride you would fine the file here:
/includes/languages/english/html_includes/YOUR_TEMPLATE/define_checkout_success.php

Skip

12 Jun 2009, 4:04 AM
#18
muah avatar

muah

Zen Follower

Join Date:
Dec 2008
Location:
USA, North East
Posts:
226
Plugin Contributions:
0

Re: Google Analytics

Yeah, I found that but am unsure about adding it there...ie., is it safe? You have not tested it either.

Anyone with some experience here care to comment?

People in the forum are stating that they have conversion tracking...but if no one has ever entered an action code on the "Thank You" Page, they do not have conversion tracking. So says Google.

Conversion shows you what was actually sold and tracks what the customer searched for online to get to your product and it helps show me how to spend money to attract the same. Very valuable tool for sure!

:clap:

12 Jun 2009, 8:48 AM
#19
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Google Analytics

I am no google analytics expert but if you want it to appear in the checkout success page then I would put the code in an appropriate place in tpl_checkout_success_default.php.

12 Jun 2009, 1:27 PM
#20
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,290
Plugin Contributions:
39

Re: Google Analytics

muah:

Anyone have a clue which file to add the "action" code to? It's supposed to target the page following a purchase..the "Thank You" page.

This is not necessary unless using Adwords for PPC. The GA script will track your conversions without any additional implemented scripting in to Analytics.

IF you are receiving NO conversion data... then likely one of 2 things is the issue. Your template is not correct and causing an issue with checkout success or you have more than one (or an old uncanceled) Analytics account for this domain and it will never track conversion data like that.

~Melanie