Totally Zenned
- Join Date:
- Dec 2005
- Posts:
- 1,505
- Plugin Contributions:
- 2
Views: 451,071
Totally Zenned
Zen Follower
Retracted....
New Zenner
i just installed simple ga and when my first order went through, it was for 2 phone home jackets. 1 in blue large and the other in black large. but according to ga i only sold one, but but my revenue totals show the total of both.
is it possible that this module only looks at the item name or number and not the attributes and therefore when it got to the second line item on the order it either completely erased the original value or just ignored the second. i
the module should instead add too the existing value if a second line item has the same item name and number
Totally Zenned
biffer791:
i just installed simple ga and when my first order went through, it was for 2 phone home jackets. 1 in blue large and the other in black large. but according to ga i only sold one, but but my revenue totals show the total of both.
is it possible that this module only looks at the item name or number and not the attributes and therefore when it got to the second line item on the order it either completely erased the original value or just ignored the second. i
the module should instead add too the existing value if a second line item has the same item name and number
This has nothing to do with how the module works. It it actually in the way Google records the data.
The module simply helps install the code on your site (that code comes directly from Google's instructions). The module just makes it easier to do by enabling you to add the tracking without the need to actually open up PHP code and plug it in.
The reports you are getting are actually correct. (Google showing 1 sale, but the full total of both (2) items.) It appears it's the way you are reading those statistics that is causing confusing (not in the way they are being recorded.)
A brief crash course on how Google reports data:
A single Goal equals a single sale (even if there are multiple items in any given order.) This is because Goals are "per action" based (not "per item").
A single Conversion equals a single sale (when using conversion tracking). Like Goals, conversion tracking tracks on a "per action" basis not a "per item" basis.
E-Commerce tracking tracks data on a "per ITEM (transaction)" basis. So, if there are two items in one given order, it will show both, and record the total value of both as well.
A single sales funnel reports data on a single GOAL (on a "per action" basis).
So, to sum it up, the only thing that you should expect Google to track on a "per item" basis is the e-commerce portion of analytics. Everything else is based on a "per action" basis with one action equaling one tracking component.
Again, this way of recording data has nothing to do with the Simple Google Analytics module itself -- which only integrates Google tracking into your website. It is completely and totally a function of how Google records your data, and how you are able to read and interpret it.
In the Google workbook I created, I go into great detail about the key tracking components you want to make sure you read in your reports, and give illustrative examples of how you can use and interpret them to help you get the most from your store. You may want to get a copy of that sometime and go over the contents. I think it will really clear a number of questions up that I consistently see users asking, and the feedback on it so far shows it has done exactly that for many who have used it.
There is a way to read and interpret statistics properly. Just installing the Simple Google Analytics module will not give you answers, it will only give you the DATA needed to get your answers. To get your answers, you need to be able to interpret what those statistics are saying.
Installing the GA module is the right start, but if one is unable to narrow down a few key statistics offered by the tracking results, and get true answers from them, then it could mean the difference between making more money, losing money when it comes to your online store.
Hopefully this post helps you a bit to understand where the confusion may be coming into play. Good Luck with your store!
New Zenner
I think you misunderstood me. There is a problem with the way this program works with google analytics. I belive it to be the way the program defines the product id.
Here is my sales according to google analytics:
Products Items Revenue
Contour Smoothy 5 $94.35
Phone Home Jacket 1 $97.95
Here is how those 2 orders look in zencart:
Products Model Tax Price (ex) Price (inc) Total (ex) Total (inc)
5 x Contour Smoothy
and
Products Model Tax Price (ex) Price (inc) Total (ex) Total (inc)
1 x Phone Home Jacket
Notice how when an order for 5 contour smoothys all in the same size and color was placed google analytics got the qty and total correct, but when 2 Phone Home Jackets are bought one a blue large and the other black large google analytics gets it wrong.
I think if there was an option to append the item_id with attribute ids it would correct the problem. I think google is only expecting to see an id once per order and the fact that this order has the same id on 2 different lines is confusing it.
Totally Zenned
What does the E-Commerce Tracking data (that is actually passed to Google) look like? The code that is separated by the "pipe" | delimiter that is.
Post that and I think I could better explain it to you if needed.
This could be due to the way you have the data on your end being setup and sent to Google. I would check to see what you are using as your unique identifier for passing data to Google.
Your choices are "Products_ID", or "Products_model".
That determines how a product is portrayed on the Google end. If a product id is identical from line to line, then that will show as a "1" (if your determining unique identifier is Product ID).
If however your identifier is "products_model", and each product color has a different model, that would comes across as "2".
See if that helps any. I absolutely understand what you are saying and where you are coming from (your illustrative description was right on), however, the way the code is setup currently, is the way Google tells you it has to be setup (1 item per line).
Totally Zenned
One other quick example that may help here.
The following code was taken from an order placed on my test Zen cart site. I intentionally ordered several products and ordered two of the same product (which come in different "options") to show you what is happening.
<form style="display:none;" name="utmform"> <textarea id="utmtrans">UTM:T|12||547.81||5.00|Test|Tennessee|United States UTM:I|12|8|A Bug\'s Life Linked|Cartoons|35.99|1 UTM:I|12|23|The Wheel Of Time Linked|Strategy|99.99|3 UTM:I|12|26|Microsoft IntelliMouse Explorer|Mice|70.95|2 UTM:I|12|26|Microsoft IntelliMouse Explorer|Mice|64.95|1</textarea> </form>
In the above example, I have 4 different "transactions" (1 for each unique product I added to my cart ... even though one of those unique products [#26] has to different OPTIONS.)
The red highlighted number indicates the "sku" that Google will use to determine whether a product is considered unique or not. The orange number represents the qty of that product purchased.
Product #26 had two different attribute options. Those different options make it unique (if it wasn't then the cart would have added a number to the first transaction for #26 and it would show a qty of "3" (instead of the "2" you see in the sample.)
Since Google analytics tracks "transaction level data", it wants each of these two different "transactions" of the same individual product on different lines (this is per Google's developer FAQ's listed on their site.)
The qty number is only appended to the previous transaction IF and only IF that transaction is identical in nature to the first (meaning, you actually added another qty amount of a product to your cart that was exactly the same as one you already had in it.)
So, having said that, I come back to the "unique identifier" that Google uses to determine how to report an e-commerce transactional sale.
In my example I indicated to Google that my unique identifier would be product ID. Therefore, as reported to Google, I only have 1 "Microsoft IntelliMouse Explorer" that was purchased. There are multiple qtys of that product, but that product alone only represents "1" unique product (that happens to come in two different variations).
So, as mentioned in the first post, go back and check what you have set as your unique identifier (done from within the admin) and more than likely, that setting is causing google to give you the data is is reporting.
I'm trying to work through this with you. I hope this post helps.
New Zenner
Where can i see the data that gets sent to google?
New Zenner
how do i make google see both items?
New Zenner
I think my best option would be to have google_analytics.php just combine the lines with identical product ids.
or add option_value_ids to the end of the product_id
New Zenner
This is a great mod! I can't believe how easy it was to install the code across the site. Eric, I've been following your blog... thanks for the easy to follow instructions.
One thing I think the mod is missing (correct me if I'm wrong) is the ability to add the code to track subdomains. For example, my main site is www.example.com, but my zen cart is at shop.example.com. To tie the two into one profile, Google's instructions say to add this code on the subdomain pages:
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-xxxx-x";
_udn="example.com";
urchinTracker();
</script>
```I was wondering if you could add the ability to enter the udn, or point me in the direction of hacking the code to enter it for my case. Any help is much appreciated... thanks!
New Zenner
Hello, everyone! I'm sorry if this seems off-topic, but no one responded to my original post about it and I'm hoping it's an easy answer that one of you knows!
I am signed up for Yahoo Search Marketing rather than Google. In order to set up simple analytics, I am supposed to "Copy the HTML code below and insert it between the <HEAD> and </HEAD> tags on your site's conversion page(s)." The code begins "<SCRIPT language="JavaScript" type="text/javascript">...
Where is this code supposed to go? <<
Do I add an html header to define_checkout_success.php and put it in there? I am very, very basic with coding, so any help you could give would be appreciated!
Thanks so much!
Totally Zenned
biffer791:
I think my best option would be to have google_analytics.php just combine the lines with identical product ids.
or add option_value_ids to the end of the product_id
Here is what your code looks like that is being passed (as you sent it to me). I broke in down into separate lines for easy reading.
<textarea id="utmtrans">UTM:T|1613||59.95||0.00|Wayne|PA|US UTM:I|1613|5|Gaucho Capri|Women\'s Active Bottoms|29.98|1 UTM:I|1613|5|Gaucho Capri|Women\'s Active Bottoms|29.98|1</textarea>
The first line that starts "UTM:T" combines all data for the single transaction.
The remaining two lines "UTM:I" are each of the line items that were passed from the cart.
This is how Google wants it to report. Again keep in mind that the way the items are passed to Google is exactly how Google states they need to be passed. So, to alter the code to combine lines with identical product id's would go against what Google says has to be done to send the data, and would cause problems.
The issue here is not how the module passes data to Google. It is in how you are choosing to:
Here is an example of what I mean. I ran a checkout procedure on a test cart of mine then recorded the end data that is passed to Google after the sale. What I did was added 2 of the SAME product to my cart then checked out. Here are the results.
<form style="display:none;" name="utmform"> <textarea id="utmtrans">UTM:T|13||146.90||5.00|Test|Tennessee|United States UTM:I|13|26|Microsoft IntelliMouse Explorer|Mice|70.95|2</textarea> </form>
The first line is again (as it should be) the "transaction" totals (UTM:T). The second line takes the two products and combines them into one line just as it should. I made no alterations to the code here, just added the same item and was on my way. It combined the lines normally.
Why? Because everything about the product was identical. If there were two different "colors" (attributes), then it would have reported two lines (rather than one).
Again, you must keep in mind that you are passing "items" to Google and that if two items differ in one area (such as "color attribute") then they are considered two totally different items.
This is the case with your cart as well. How would you know which product ITEM a customer ordered if your CART combined them into 1 "item"?. You would have no idea what color was ordered if the two different items were combined.
It's this simple. However many individual LINE ITEMS you have listed on your "shopping cart page" (when viewing your cart), that is how many "LINE ITEMS" you will have when passing the data to Google. If you want it to operate differently, you need to alter your products.
Totally Zenned
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-xxxx-x"; _udn="example.com"; urchinTracker(); </script>MyGreyGoose:
This is a great mod! I can't believe how easy it was to install the code across the site. Eric, I've been following your blog... thanks for the easy to follow instructions.
One thing I think the mod is missing (correct me if I'm wrong) is the ability to add the code to track subdomains. For example, my main site is www.example.com, but my zen cart is at shop.example.com. To tie the two into one profile, Google's instructions say to add this code on the subdomain pages:
Glad you like the mod MyGreyGoose, and glad you like the blog to.
Thanks for the suggestion on the mod as well (the addition of the subdomain capability), however, that wouldn't be a feature which "should" not be added (it would need to be added by hand manually) and here is why.
First understand that you can track subdoamin activity several ways. The method you described allows you to track additional subdomains under one website **profile**.
When you add the line of code (for subdomain tracking "_udn="example.com"; ") that you are specifying, it should ONLY be included on the pages of the subdomain itself (not on the rest of the "root domain" pages).
Google states the following:
> "You can track subdomains within the same profile as the domain. In order to do so, you'll need to add a line to the tracking code on **each page of the subdomain**."
Notice the last section that I out in bold. It specifically states "pages in the subdomain". So to add it as an option to the entire module would not work because the module assumes the code is used for one domain.
Now, here are your options to get you where you want (there are a few):
**Option 1 - requires programming knowledge:**
Manually alter your "tpl_main_page.php" file with some PHP code that gets the url string and splits it to determine if this is a subdomain page or not. If so, add the line of code you need to the tracking.
Then, you may need to set a filter in your Google Analytics account to distinguish between different subdomains (if you have more than one).
**Option 2 - easier method, and will work the same as the above**
Option two here achieves the same effect as the above, however, rather than tracking subdomains under one website profile, you track them as **separate** website profiles (under the same Google Analytics account).
You still would need to do a little "manual programming" to achieve the effect as this code should ONLY be included on the pages of the subdomain again.
Under option 2, you create a NEW website profile under the same Google Analytics account for each of the subdomains you want to track. This will give you a unique tracking id for each subdomain.
Now, you still need to alter the tpl_main_page.php code to determine whether the page(s) being viewed are in the subdomain of the site, or the root domain.
However, this time, instead of adding the line of code we talked about above, you would perform an "if then" and list out the entire set of new tracking code for the subdomain ("else" list the code for the root domain).
It gets a little more complicated when tracking subdomains because the code has to bee entered ONLY on the pages of that subdomain being tracked (but it can be accomplished).
Hope that helps. :)
Totally Zenned
chacha-vintage:
Hello, everyone! I'm sorry if this seems off-topic, but no one responded to my original post about it and I'm hoping it's an easy answer that one of you knows!
I am signed up for Yahoo Search Marketing rather than Google. In order to set up simple analytics, I am supposed to "Copy the HTML code below and insert it between the <HEAD> and </HEAD> tags on your site's conversion page(s)." The code begins "<SCRIPT language="JavaScript" type="text/javascript">...
Where is this code supposed to go? <<
Do I add an html header to define_checkout_success.php and put it in there? I am very, very basic with coding, so any help you could give would be appreciated!
Thanks so much!
Are you asking how to setup Yahoo Search Marketing code using the Simple Google Analytics module, or are you asking how to setup the Google Analytics module in addition to the code you already have entered for Yahoo?
I have done both successfully (and am converting my Yahoo code to a contribution as well), but you can't setup Yahoo using the Google mod. Please clarify your needs so I can assist.
New Zenner
Well, I probably have a pretty rare situation where my overall site https://www.example.com is on a separate server and shop.example.com is on it's own server. My main google account is tied to example.com, and ALL of my zen cart is on shop.example.com... so having the option to enter a subdomain in this module would work for me b/c none of that code touches anything that is not that subdomain.
Any way, the fix for me was pretty simple and straight forward: I went to includes\templates\my_template\google_analytics\google_analytics.php and added _udn="example.com"; to the code. I think that'll do the trick. I then went and set up a filter per Google's instructions so that it'll distinguish between my https://www.example.com and shop.example.com files. I hope it works!
Totally Zenned
In order for that to work, just make sure you only include the "_udn" code within the tracking for the subdomain pages only (no the root) and vice versa.
When applying that method, it only should appear on those pages which are being considered "seperate" in your eyes. Otherwise, it will not work.
New Zenner
Hello, Eric! I'm sorry for the lag in my response. To clarify:
I don't know if I need a mod or not.
All I know is that I'm supposed to add the piece of code (javascript) to the html header on the purchase confirmation page.
So is there an existing file that I would just add it to?
If not, how do I go about getting that code somewhere so that it will be read as the head of that page?
Thanks so much for all your help!
New Zenner
Hi i need some help i am just trying to sort this out for a friend... I think i have gone through the instructions properly... But i am getting this error
[B]SQL query:[/B] [URL="http://dev.mysql.com/doc/mysql/en/SELECT.html"][IMG]https://phpmyadmin.1and1.co.uk/themes/1und1/img/b_help.png[/IMG][/URL]
SELECT (@t4 := configuration_group_id
) AS t4
FROM configuration_group
WHERE configuration_group_title = 'Google Analytics Configuration'
[B]MySQL said: [/B][URL="http://dev.mysql.com/doc/mysql/en/Error-returns.html"][IMG]https://phpmyadmin.1and1.co.uk/themes/1und1/img/b_help.png[/IMG][/URL]
#1146 - Table 'db177628526.configuration_group' doesn't exist
```Please Help
New Zenner
Please ignore the last post i was being dim!!!!
Fields marked required must be completed.
Tell staff why this post should be reviewed.