Measurement Protocol - Enhanced E-commerce Tracking currency issue - google-analytics

I am having issues with Measurement Protocol. According to docs I should send "cu" - CurrencyCode to set a currency. I am not getting that currency in my analitics view. It is showed in USD.
My sample hit
v=1&t=pageview&tid=UA-105189848-1&cid=555&ds=&z=&dh=lechtest.roboticket.com&dp=%2FTransaction2&dt=Transaction&pr1id=3923915&pr1nm=Lech%20Pozna%C5%84%20-%20Wis%C5%82a%20Krak%C3%B3w&pr1ca=ticket&pr1br=&pr1va=Darmowy&pr1ps=&pr1pr=0&pr2id=3923914&pr2nm=Lech%20Pozna%C5%84%20-%20Wis%C5%82a%20Krak%C3%B3w&pr2ca=ticket&pr2br=&pr2va=Darmowy&pr2ps=&pr2pr=0&pr3id=3923913&pr3nm=Lech%20Pozna%C5%84%20-%20Wis%C5%82a%20Krak%C3%B3w&pr3ca=ticket&pr3br=&pr3va=Darmowy&pr3ps=&pr3pr=0&ti=4724692&ta=roboticket&tr=0&tt=&ts=0&tcc=&pa=purchase&cu=PLN
I tested that with google hit builder and it looked okay, parameter was even linked to docs.
Docs refference
Any clue what I am doing wrong? I'd appreciate any help with that currency issue.

Any clue what I am doing wrong?
Yes, you misunderstand what that parameter does. Your views shows values in the currency that is selected in the view settings. If you send a currency designator that's different from the selected currency (and it is one of the supported currencies) then GA will convert your amounts from that currency to the currency set in the view. That's a feature to support shops that support multiple currencies.

Related

Google Analytics API returning no data before 23/09/16

I have a Google Analytics API request that provides full data for any date after 23/09/16, but nothing before.
The metrics/dimensions in use are:
date
ga:sessions
ga:users
ga:deviceCategory
ga:sourceMedium
ga:campaign
I have created a custom report with the same dimensions/metrics in the web view, and I can confirm that the data does exist there (and is being provided). If I take out deviceCategory (or only have deviceCategory) then results are returned. This suggests to me that before this date, deviceCategory and sourceMedium/campaign were an invalid combination, but I can't find anything in the release notes to suggest this was changed and checking previous versions of the dimension explorer using archive.org does not indicate this was the case either.
I have raised a support request with Analytics support but they have said they don't have a team for API related issues.
Any help would be greatly appreciated. We already have a lot of reporting built around this combination and would like to be able to compare historical data.
Edit: I think this has something to do with the data retention settings in Analytics (which default to 26 months). Not sure why this particular combination would be affected as there is no user or event data required here.
You are right, it's because of data retention settings.
"The retention period applies to user-level and event-level data associated with cookies, user-identifiers <...>"
https://support.google.com/analytics/answer/7667196?hl=en
deviceCategory is associated with ClientID.

Google Analytics eCommerce Report Local Currency

new here and looking for help.
I'm trying to get the amount people are spending on a products for a website in local currency.
I'm looking at a GA page for someone overseas and the currency values from itemRevenue for each productName I'm seeing in my report in Sheets are not looking like they're local to that store but rather my countries currency. I've tried localItemRevenue but that gave an error saying the dimensions and metrics can't be used together. I've got date/hour included as well in the report.
I tried to use itemRevenue with currencyCode to get around this but they couldn't be used together either.
I thought I could use transactionRevenue along with productName/date/hour/minute but that didn't work (I realised because more than one item can be bought per transaction).
Could someone tell me what GoogleAnalytics uses for currency here and if it can be solved easily?
Google Analytics uses the currency settings that are set in the data view settings.
If you send a different currency, as specified by the currency field in the e-commerce-tracking, GA will convert it to the currency set in the view settings as long as it is on the list of supported currencies.
So the first thing to do would be to check the view settings - this defaults to USD, and it happens amazingly often that people fail to set the proper currency.
Next thing to check would be to see what is actually sent to the property - if there is a mismatch between view currency and currency set in the code the values will be converted from the latter to the former.
Your question is not quite clear to me.
However I am assuming that you want to set local currency of your client's country in Google Analytics account.
You can change your currency:
1) Login to your Google Analytics Account
2) Select the View & Click on View Settings.
3) Set "Currency displayed as" -> currency of your choice.
Unless and until you set your desired currency here, you won't be able to get it in Web Interface, Query Explorer, Sheets or API.
I hope this helps.

Revenue in Google Analytics not appearing correctly

I've just finished tagging a website, and currently submitting test data.
On one page we fire an Ecommerce purchase event, which consists off the transaction information / product information.
The transaction object is populated by retrieving values off the page i.e from html labels this is all working as expected, however when we check Google Analytics > All Web Site Data it seems GA is formatting the number and removing trailing zeros for some strange reason, please see an example:
This doesn't happen to all purchase events, as you can see at the top of the table there is an entry for $1,793.04 and this has been displayed correctly.
In regards to populating the transaction object, we aren't doing any formatting what so ever we simply reference the html label value and pass that, so I'm unsure into how this could be happening. Has anyone experienced this before?
Personally I have not found this anywhere else documented but just to be sure you can conform with the formatting expected by the Measurement Protocol. Meaning the http request that will be ultimately sent to GA servers to process your values. The transactionRevenue and most monetary values in analytics.js are of type CURRENCY and you can find the documentation of these data type in the parameter reference. And from the link I quote
A decimal point is used as a delimiter between the whole and
fractional portion of the currency.
So the thing that I would advise you to do is use some js function to format your string values. Remove the comma and then use the (.) as a separator for whole and fractional point.

Different Dates on Google Analytics and Shopify Sales Data

I've got a problem matching shopify data with google analytics data. The numbers were more than a few hundred dollars off, so I figured it was a bigger problem than the normal problems.
I exported the shopify sales and the sales counted in google analytics. The values and quanities of orders were the same, but the dates were different. In GA, it was saying a sale was on 3/6/2015, but shopify had it as 3/16/2015. I checked with the client and they had received that order on the 16th. So somehow GA had the time 10 days off. And this is happening on many orders, but not all.
Have you seen this before? And how is shopify sending an incorrect date to GA/how is GA reading an incorrect date?
I'm not sure what more information to give here. I checked the implementations and everything seemed normal.
in the addTrans and addItem calls you're passing the data to, there is no formally passed date. GA related the instance of the addTrans to whatever time it was received.
what % of orders would you say are being dated incorrectly?

Cost data from Adwords to Analytics in multicurrency is not correct

I have come across quite a peculiar issue. In one of my Google Analytics accounts, I have it linked together with two different Adwords account. All good so far.
The issue is that one of the Adwords accounts is in dollars (which cannot be changed), and the other one in my local currency. Looking at my Google Analytics reports, I am currently seeing the Adwords cost as my local currency for both, which is totally wrong.
Let me give an example:
$1 is, let's say, roughly worth 10 in my local currency.
So, given that I spend $150 in my Adwords account, it would show up as 150SEK in my GA-reports (SEK being my local currency). It should in fact be 1500 since the Adwords spend is in dollars, and there is no conversion done between the two systems with a mismatching currency.
Does anyone know how I can see the correct spend inside my Google Analytics account, seeing as the two Adwords accounts are using different currencies; SEK and dollars?
As far as I know, it imports the value only and will show the currency selected in Analytics. The 150 comes from AdWords, SEK is the currency in Analytics, so it'd show 150SEK.
Not many references in other help forums (I was trying to find some discussion that would help confirm my guess :) but I found this little snippet which mentions that the currency and timezone must match.
GA supports multi-currency however it is only for e-commerce metrics. You could upload data using the Cost Data Upload but "This feature is intended for non-Google paid campaigns. To import Google AdWords data, link your Google AdWords and Google Analytics accounts." All in all you cannot have cost data for two currencies in one view, however you could link the one account to a separate view (with the correct currency setting)

Resources