Google Analytics Ecommerce Tracking minimum price? - google-analytics

is there minimum value for price?
can I send items with price of 0.00085 for example?
ga('ecommerce:addItem', {
'id': '53d8c003cf07a6.46359058', // Transaction ID. Required.
'name': '6', // Product name. Required.
'price': '0.00182', // Unit price.
'quantity': '1' // Quantity.
});
thanks

You can sent whatever you want, but only two decimal places are displayed in the interface so your "micropayments" will show up with a zero revenue (I tested this with enhanced ecommerce but I don't think the interface will behave differently with standard ecommerce).
Update: I repeated my test to get an answer for the comment below. I found that a) yes, product revenue is summed up in the product performance reports, b) it seems that the way this is displayed has changed a bit since I last tested this - there is now a "less than" sign to indicate that product revenue is less than 0.01 (see screenshot).

Related

GTM Ecommerce Tracking Issue

I am expecting someone to help me on the below. Below is the scenario
We are planning to track revenue, products sold etc and we have setup standard ecommerce tracking using GTM on my test domain. If the ecommerce tracking works fine on the test domain then, we have planned to move it to live.
Trigger I have setup
enter image description here
Tag I have setup
enter image description here
Data layer code placed on Confirmation page above the GTM container immediately after opening the tag
<script>
window.dataLayer = window.dataLayer || []
dataLayer.push({
'transactionId': 'XYZ',
'transactionTotal': 123,
'currencyCode': 'SAR',
'transactionProducts': [{
'sku': 'abcd',
'name': 'iphone',
'category': 'Mobile',
'price': 999,
'quantity': 1
}]
});
</script>
Here the problems are
1) Whenever someone lands on confirmation page in real time goal conversion visitors are showing as
two instead of 1 for that confirmation page.
2) I did continuously 4 bookings but only one booking is showing in goal conversions option and also
ecommerce tracking is also showing for that one booking only. But for all the 4 bookings GTM tag
triggered and also in real time conversions it showed for that 4 bookings.
3) After 15 mins again I made a booking then, that booking is tracking in analytics and showing
under conversions option.
I just want to know why does this happen. Why analytics is not tracking goal conversions if I do
bookings continuously from my system. Why it is tracking after that 15 mins of time.
2) Goals are registered only once per session, so unless you wait 30 minutes or remove the cookie the goal will be completed only once. Also if you re-use the transaction id this will be merged into a single row in the reports (try and set minutes as secondary dimension, that should break up transactions into different rows). Better use different transaction ids for testing (maybe random strings).
3) It seems by then your session has ended (unusual, session should be 30 minutes by default, or until a change of traffic source) and so conversions are recorded again.
As to 1) no idea really - if two users show up that would mean you create two GA sessons with different client ids, but there is nothing wrong with your trigger. I don't think this can be diagnosed without looking at your page.

Google Analytics Enhanced Commerce Purchase

I'm currently trying to track my new e-commerce application by the use of the enhanced commerce plugin from google analytics.
I got one weird tracking issue I don't understand.
Here's a screenshot from the User Explorer
This screenshot ist taken from the "User Explorer". Reffering to the screenshot, I'm expecting to see the correct EUR value and not just EUR 0,00€. So my problem is, that I'm adding the products correctly but I still just see EUR 0,00€ instead of (in this example) EUR 1.650,00.
However, if I check the details of this "event" you see products properly with it's quantity and price. I'm also sending the ec:revenue parameter set with the correct value for this transaction.
Here's my purchase action code:
commercePurchase: function (id, affiliation, revenue, shipping, tax) {
console.log('GA Comerce Add Transaction: ', id, affiliation, revenue, shipping, tax) ;
console.log('set action purchase!');
ga('ec:setAction', 'purchase', {
'id': id,
'affiliation': affiliation,
'revenue': revenue,
'tax': tax,
'shipping': shipping
});
}
Am I missing something obvious?
Thanks!
Regards,
Santo

How to track multiple coupons?

Is is possible to track multiple coupons for a single order/transaction in Google Analytics? According to the documentation, the key 'coupon' should be an text...
In our store, customers can fill in multiple coupons for a single order. All the coupons will apply on the complete order, not on products. For example: The coupon 'NOSHIPPING' can be used to get free delivery, but also coupons can be linked to customers to give them an extra discount. So the code 'MYDISCOUNT5PERCENTOFF' gives a selected client also 5 percent discount of the total order. So the order can be completed with 2 coupons!
In the examples on https://developers.google.com/tag-manager/enhanced-ecommerce#purchases only a single coupon is given...
dataLayer.push({
'ecommerce': {
'purchase': {
'actionField': {
'id': 'T12345', // Transaction ID. Required for purchases and refunds.
'affiliation': 'Online Store',
'revenue': '35.43', // Total transaction value (incl. tax and shipping)
'tax':'4.90',
'shipping': '5.99',
'coupon': 'SUMMER_SALE'
},
'products': [ ... ]
}
}
});
Already tried some thing, but it's not possible to push the same object twice, but with different coupons, because the second push will overrule the first one...
It's not possible to push a second purchase after pageload / something like that. Already tried to seperate the coupons with comma's, 'coupon': 'NOSHIPPING,MYDISCOUNT5PERCENTOFF' but that just gives a coupon with the name including the comma in Analytics, so seperate coupons can't be filtered...
Also tried to set an array instead of an text, like 'coupon': ['NOSHIPPING','MYDISCOUNT5PERCENTOFF'], but that doesn't register any coupons at all...
Is there any way how to track multiple coupons in Analytics for a single transaction? And if not, please make this possible!
You won't be able to apply multiple coupons to the same transaction, and you've come close to what I think may be the only solution, which is to concatenate the coupon names, but use something like a pipe (or something easy to distinguish) to delimit them. For example:
'coupon': 'NOSHIPPING|MYDISCOUNT5PERCENTOFF|ANOTHERCOUPON'
In your reports, you would just have to mindful of this concatenation. You could also set up a custom dimension(s) for additional coupon codes, but this would seem more wasteful of a CD, unless you are on A360 and have more than you know what to do with.

Track purchases by SKU in Google Analytics

Our products are apparel, so we have lots of sizes and color variants that roll up under a single product id.
We have Google Tag Manager integrated with Google Analytics and Enhanced Ecommerce. On the product detail page, the product id (parent level, no variants) is pushed to the datalayer in a sku variable. On the confirmation page, the dataLayer > transactionProducts is populated with an array of each sku ordered. SKU is also at the parent level. Hence, we can see a product page conversion rate based on sku ordered vs the sku passed for product impression.
Google Analytics will only take the first instance of a SKU value and ignore the rest. So, in the below example, Google Analytics will show 3 units of SKU 123 were sold in this order.
dataLayer = [{
"pageName":"confirmation",
"pageCategory":"checkout",
"transactionProducts": [{
"sku":"123",
"vn":"123:black",
"price":10,
"quantity":3,
"currency":"USD"
},{
"sku":"123",
"vn":"123:white",
"price":10,
"quantity":2,
"currency":"USD"
}]
}];
My question is this: how can we track purchases as in the example above such that total quantity of SKU 123 is recorded in GA?
By my lights, we either 1. Change what SKU means on the product page vs the confirmation page, and keep SKU as the parent in the former and update SKU to be vn on the latter or 2. Give up the ability to see purchases of variants and push parent-level sum totals into transactionProducts in the dataLayer on the confirmation page. If we do 1, then I fear we'll loose the product page impression conversion rate metric. If we do 2, then we loose visibility into purchases by variant. Is there any other option for tracking total SKU's purchased that I am missing?
Maybe a late response on this one but I'd go with option 1 so that you can easily see product conversion (purchase / prod views). Then if you want to capture the variant, you should be able to use the variant key. And if you need to add more keys other than the standard ones (https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#product-data) you could create some custom dimensions with product level scope.
So then your dataLayer would look like this:
dataLayer = [{
"pageName":"confirmation",
"pageCategory":"checkout",
"transactionProducts": [{
"sku":"123",
"variant":"black",
"price":10,
"quantity":3,
"currency":"USD"
},{
"sku":"123",
"variant":"white",
"price":10,
"quantity":2,
"currency":"USD"
}]
}];

Universal Analytics - push multiple values for one dimension and one pageview

I am trying to use google universal analytics and its custom dimensions.
On one page, I want to send multiple values for one (and one only) dimension.
I tried:
ga('send', 'pageview', {'dimension1': 'grumpy cat'})
ga('send', 'pageview', {'dimension1': 'happy cat'})
When I use google API, I can get for my dimension1 all the values I just sent - so it works well.
However I think (I am not sure about it) that I should not send several times a pageview hit on the same page because it would disrupt the pageview metric.
So I tried to use a custom metric (pageview is a metric after all):
ga('send', 'metric1', {'dimension1': 'grumpy cat'})
ga('send', 'metric1', {'dimension1': 'happy cat'})
But this one doesn't work at all :(
It seems ga.('send'... only accepts pageview but it is weird (why specify pageview in the arguments if it is the only value possible?)
How can I solve my problem? Is it just a syntax issue, is it not possible with custom dimension / custom metric? Can I actually use pageview to do it? Should I use custom events instead of that?
Thank you!
* edit *
I actually found out that I may use an event with a label like:
ga('send', 'event', 'cat', 'view', 'grumpy')
ga('send', 'event', 'cat', 'view', 'happy')
(If anyone can confirm it or have comments I would be happy with that)
I had a similar problem a while back. The thing is, you cannot push multiple values to a single custom variable (dimension or metric) in both Google Analytics (GA) and Universal Analytics (UA). What happens when you push more than one value to a custom variable, dimension, or metric for a single page (or session or user, depending upon the scope of the custom variable, dimension or metric, if you're using UA) is that the last reported value is the only one that is recorded. The last value overrides the previously set value. So, you have tried to record two pageviews with 2 different values for your custom variable (or dimension).
In your case, say a person loads a search results page after having included two categories, grumpy cat and happy cat, and you want to record both of them in a custom variable or dimension by reporting the variable (or dimension) twice, and if you send them in the order you mentioned,
ga('send', 'pageview', {'dimension1': 'grumpy cat'});
ga('send', 'pageview', {'dimension1': 'happy cat'});
you are simply recording two different pageviews (which will skew your reports in innumerable ways, depending on the number or categories you may have). For example, if a person visits more than 5 categories, you will have duplicate pageviews, and your time on page will be drastically reduced, as according to UA (or GA) these pageviews (except for the last one) would have lasted for less than one second.
Also, any events you wanted to link to those custom variables (or dimensions), would only be linked to the last pushed pageview or custom variable (or dimension). As an example, if you had an event tracking set up to identify how many people interacted with the search results, and if you then wanted to filter by category (dimension1 in your case now), to know how many people interacted with the page when dimension1 equals grumpy cat you would get 0, as the events would have only been recorded for the pageview with ddimension1 equal to happy cat because that was the page which GA (or UA) thinks the user had been viewing when firing the event, and that page only had dimension1 set to happy cat. Since those two calls are async, you would actually never be able to know if the events were sent to the pageview you think it went to, even as I explained.
The better way to record this type of data would be to use url-encoded category names, space separated, and a space appended to the end of the list also. As an example, you must send the pageview as,
ga('send','pageview',{'dimension1':'grumpy-cat happy-cat '});
or better, as,
ga('set',{'dimension1':'grumpy-cat happy-cat '});
ga('send','pageview');
Note the space at the end also. This extra space allows you to filter any report based on the custom variable using the reg-ex <categoryName>\s. As an example, to find out how many people viewed a page with category Grumpy Cat, you will filter your report such that the dimension1 matches regex grumpy\-cat\s. I have escaped the - character in regex using \-, and \s stands for a whitespace character. The good thing is, such a report will fetch you all pageviews (or whatever you want to look at), those with only the grumpy cat as category name, as well as those pages which have grumpy cat in the categories to which a page belongs.
A way to add subcategories is to send dimensions as cat1 cat1-subcat1 cat1-subcat2 cat2 cat2-subcat1 so that the regex cat1\s will take care of all category level pages, whereas the regex cat1 will take care of all pages which have category cat1 or which have a subcategory belonging to cat1.
Hope that helps. :)
On a side note, using events for views of a page containing a category is not a nice way of recording it. Because, if you assign dimensions (and this is one of the reasons why custom dimensions were introduced, as different sites have different categories and Google can't name all), your events will also carry the dimensions of the page and it helps a lot to identify which categories are in need of what, by simply segmenting your reports by, in your case, dimension1. For example, you will get to know which category has highest SEO visits and which has the best conversion rates, and stuff. Happy analysing! :)
As it's already stated previously, you can not push multiple values at once. However, this is just an indication the approach to collect events data is not right, that is this is not a page view event anymore. My case was different, but the solution breaks down as follows:
You have multiple values to push into UA at once, say cat's features such as white, grumpy, hungry
Now, you actually realise that this is not a page view event, but rather yet another dimension - cat views/conditions/features - name it whatever you like;
You create a custom event in your GTM, called 'cat-condition';
You create a new tag in GTM collecting cats condition;
You create that custom dimension in GA and GTM, and every time you have to record cats condition you do something similar to the following (extremely simplified code sample)
['white', 'grumpy', 'hungry'].forEach(condition =>
dataLayer.push({event: 'cat-condition', condition})
)
Code snippet assumes you have GTM container configure on the page to enable dataLayer.
Finally, create a custom report in GA to deal with cat conditions. Surely, you can push more details with every single cat's condition to be able to relate it with the page details etc, but this way you have quite a flexible solution with the data being normalised right from the beginning.

Resources