Google Analytics unique events is incorrect - google-analytics

We have a Google Analytics account set up to track downloads on certain files. When you create a report with, for example, Event Label (user) as the primary field, and Event Action (file name) as the secondary field, GA will say that the number of unique events is 168. When you add up the numbers in the unique events column, however, they add up to 322. Exporting the table as a CSV file and viewing it in Excel will also give you 322.
I should also add that there are 270 rows in the table, so for there to be 168 unique events, that would mean some user/file combinations would have 0 unique events, which doesn't make any sense.
Can anybody shed some light on why this is happening?

There is a lot of confusion with Unique Events metric. Instead of counting a number of times an event with unique combination of category/action/label happened, GA was counting unique combination of every dimension included in the report!
Finally that metric is deprecated now and renamed to Unique Events (legacy).
Instead we get a real Unique Events (new) metric which behave like expected.
More explanation in my blog post
http://www.internetrix.com.au/blog/google-analytics-unique-events-are-dead-long-live-unique-events/

In all Google Analytics custom reports, the Unique Events field actually reports the number of Visits (or sometimes a slightly higher number).
Built-in Google Analytics reports will show you the correct number of Unique Events.
It's a bug, plain and simple. I reported it to Google back in August, but it's still broken.

The number in the Google Analytics standard reports can be explained...but as Aaron pointed out, it sure looks broken. I wrote an article explaining it all:
http://www.analyticsedge.com/2014/09/misunderstood-metrics-unique-events/

Related

Google API shows duplicate rows for TransactionId's

I've got a strange problem.
I'm trying to pull out data from GA API.
metrics: ga:users
dimensions: ga:date,ga:source,ga:medium,ga:transactionId
After reviewing the data I can see that I have multiple transaction Id's.
Usually 5 to 7 duplicates per month - the same transaction ID is in two dates.
In Google Analytics there are no duplicates.
There are in the exported data + Query Explorer also shows duplicates.
Does anybody know why?
Thanks,
Krzysztof
First of all, do you make sure you use unique transactionIDs for each transaction? I've seen cases where the ERP makes certain transaction or orderIDs available again after an order was cancelled.
If you look at the transactionID in GA (click in on the ID itself to drill down into it) and change to Quantity or look at the product revenue for the graph line, do they occur on two different dates?
This behaviour is often seen if you forget to prevent the transaction pixel again on things like a page refresh. Another example is if they perhaps receive an email with "Click here to view your order/transaction" and it fires again on the receipt page.

Core Reporting API v4 sampling limit for click data

After how many clicks will the Core Reporting API start to sample the click data, when using samplingLevel=LARGE?
I'm trying to retrieve data from a large account (i.e. more than 30,000 clicks/day on average) and the number of clicks doesn't always match what I can see on Google Analytics. This, however, seems to happen only on this large account, and not every day. Strangely, on those days where the click count doesn't match, transactions and revenue match what I can see in Google Analytics.
In my query, I'm only trying to retrieve the data for a given account, without applying any filter.
EDIT: If I don't retrieve data aggregated at the account level ― thus not including ga:adwordsCampaignID, ga:adwordsAdGroupID and ga:adwordsCriteriaID in the dimensions ― I can retrieve all the clicks.
EDIT2: If add the ga:deviceCategory dimension, along with ga:adwordsCampaignID, ga:adwordsAdGroupID and ga:adwordsCriteriaID I can retrieve all clicks. I'm not sure if this can help narrow down the issue.
Google Analytics has a cardinality of 50K after that you ll receive (others)
Based on the "EDIT" i can safely assume the reason is that when a click doesn't have an 'ga:adwordsCampaignID' associated with it, it ll not retrieve that click. This happened to me with custom dimensions.
EDIT: Try using the 'include-empty-rows' parameter on your query. https://developers.google.com/analytics/devguides/reporting/core/v3/reference#includeEmptyRows

Unique events are greater than total events

I'm having an issue with Unique Events and Total events. I don't really understand why unique events are greater than total events (image attached: https://analytics-a-googleproductforums-com.googlegroups.com/attach/584c3c65bd24cfec/Screenshot%20at%202013-05-14%2017:00:40.png?gda=9qkpgUYAAADqfLbDOUx1KZ9vP-6pB8mH0QevsNJBCwpb2zqmxh9R_FqJw8mf6kYUxitGhb4bDE5x40jamwa1UURqDcgHarKEE-Ea7GxYMt0t6nY0uV5FIQ&view=1&part=4).
Someone can explain how this is posible?
Santiago Vázquez
Found the thing: you will see that "Unique Events" are great than "Total Events" when you look at an event category or action, put "Event Label" as a secondary dimension and the event has been triggered some times with no label input. Google Analytics hasn't the option "(not set)" for this particular dimension, so it just doesn't show you those events in the Total Events Count, but still counts as "Unique Events" all the users that executed this particular event category / action.
I am seeing this same issue in my the first view of my Custom Report as well. I don't know WHY it is showing more, but there seems to be a more accurate Custom Report drilldown for you to use. In my reports, one page shows in my Page drilldown with 30 total events but 62 Unique Events. However, when I click into the next dimension drilldown view, in other words click to narrow in on just one page, it shows that same page with 30 total events and only 29 unique events. That seems more accurate.
My dimensions drilldowns for this custom report are "Page" and then "Event Label"
Hope this helps!
I think Google Analytics is simply buggy.
They have to work on event reporting a bit more.
We are tracking events and e-commerce data to our own database, and we realised that both Google Analitics and Universal Analitics misses some events and e-commerce data.
We are trying to find the reason for this, but no luck yet.
If you have a segment applied it's probably sampling. You can confirm or deny sampling is the cause by seeing if there is a yellow background note above the graph but below the date selection on the report page. There is also a grid of filled in and not filled in circles next to the new scholar cap (also below the date selection) sometimes.
Unique events are calculated by session, while total events are determined by the main dimension.
In the example report below, I wanted to look at how many events occurred on each page. The dimension drilldown is Page, with Total Events and Unique Events as metrics.
Users can visit a page, but not send an event by that page ( 0 total events ). However, if their session includes an event, then unique events will be 1 or more.
Custom reports allow data combinations that may not be clear (not sure if someone already posted this point or if I saw it in another thread). Basically, my report should not include Unique Events to prevent this problem from happening, though this was probably the wrong way to go about this altogether.
Template: https://www.google.com/analytics/web/template?uid=XafJ7KvSSf-n5KWWPyvn_g
Google has deprecated (renamed) Unique Events metric as it was seriously confusing. We are expecting to see a number of times event with unique combination of category / action and label happened per other dimensions in report. Instead GA calculated a unique combination of every dimension in the report!
Now, this metric is deprecated and renamed to legacy.
New one: Unique Events is giving expected results.
I written about why total events are higher than in my blog as too many questions.
Total Events are calculated as the total number of interactions with a tracked web page object. On the other hand, where a single user session (or visit) has one or more events, this is calculated as a single Visit w/Event, or Unique Event in the reports. For example, if one user clicks the same button on a video 5 times, the total number of events associated with the video is 5, and the number of unique events is 1.

Doing cohort analytics on Google Analytics

Suppose I have 65 people that register on January 1, 2012.
I want to find out how many of those 65 people returned to the site that same week. (More generally, if n people signup on date A, I want to be able to find out how many of those n people return in a given date range.)
Is there a way to do this using Google Analytics? If so, how? I am currently getting the user's username for each page hit.
If you only need to track people who sign in then you don't need to get very fancy. You can copy the relevant user attributes, such as sign up date, from your DB to GA using events or session level custom variables.
But if you want to track everyone, including those who don't sign up, then you'll need to use visitor level custom variables (GA cookies).
I explain how to set this up in detail in this post so I'll just highlight the key points here:
First, decide how to layout the data in Google Analytic's custom variables based on your requirements. For example, are you storing retention dates for daily, weekly or monthly tracking? Do you also want to track cohort goals? Partition this data into the available custom variable slots.
Write the cohort data to these custom variables when visitors arrive or achieve goals using Google Analytic's _setCustomVar function. Setting the fourth parameter of that function to 1 indicates you want to do visitor-level (cookie) tracking.
For each cohort you wish to analyze, create an advanced segment in Google Analytics. Using a regex expression in the condition will give you the flexibility to segment for interesting cohorts. ex: "All users whose first visit was the week before Christmas".
Analyze the results with reports by specifying a date range and the corresponding cohort-sliced advanced segments. Another option is to extract the data using the Google Analytics Data Feed Query Explorer or their API.
Once you've put in the work your new visitors will be stamped by their first visit date and nicely fall into each daily or weekly retention bucket. This is what it might look like if you were tracking weekly retention, for example:
This is not a full solution, but here are some points on how I would approach this problem with the help of Google Analytics:
You have to make sure that you somehow store the registration date of each user, either in your database or in a cookie. Then have a look at Google Analytics Event Tracking. You could for example set up a new category based on the registration date. On every page load in your page, you then have to set up this event tracking call, for example like:
_trackEvent("returns", "2012-01-01", "UserId:123123123")
This way you will receive all page views for users that registered on that particular date. To add a date range in this, you have to make sure that these events only get fired for the number of dates after the signup (e.g. 7 days).
After your date range, you will be able to see how many page views and how many users returned - you even know which users came back.

Google Analytics: Using custom variables to track growing values

I believe custom variables in Google Analytics can only be used to track the distribution of different values for that variable over time.
Suppose I have a forum and want to track the total number of posts made in that forum. Could I track them over time with Google Analytics, too? And how?
Custom Variables are a user-based dimension. So, traditionally, instead of measuring forum posts, they'd instead identify users who post on forums. That doesn't seem like what you're trying to measure.
Instead, you should consider looking at Event Tracking. Specifically, they allow for the tracking of 4 separate data points (per hit): 3 strings and a integer value.
So, you could use this to track when posts happen, or when comments happen on those posts, and then aggregate the values by whatever dimension you like using the API. You'd just need to bind the event to occur at the times you intend, with the data you want to track.
So, an example event call for you, tied to whenever someone posts a comment on a forum topic:
_gaq.push(['_trackEvent', 'Form Posts', 'Comment', topic_name, 1]);
You could then use the API to query particular views to tabulate whatever aspect of the event you want to aggregate. You can simulate those calls with the Google Analytics API Query Explorer. In this example, you could get number of Comments per day using Dimension set to ga:date, Metric set to ga:totalEvents, and then set the filter field to ga:eventAction==Comment

Resources