How to calculate Clicks in GA report with BigQuery table - google-analytics

I am trying to create and match a report in Google Analytics through data in BigQuery table, but I couldn't find any way to get the same figures for "Clicks".
The definition of "Clicks" in GA is The number of times users click on your ad.
So I have tried COUNT or COUNT DISTINCT gclId column under adwordsClickInfo and all other methods, but still cannot replicate the number.
How do I correctly count the Clicks with my ga_session_* table?

Related

Google Analytics: Show User ID view report day by day

In GA dashboard, there is only report of number of active users in a day or week or year. If I need a report to collect which user id who visits my website, I have to click the range of the date day by day and export so many excels in order to combine them into one.
Is it possible to get a list of all user ids day by day.
The user id field that you have submitted with your google analytics hit data is used for internal processing. It is not something that you can actually see in either the google analytics website or the google analytics api. Its used similar to the session id.
If you want to see it i recommend you try adding it as a custom dimension.

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

Google analytics to Google Spreadsheet

I want to set up the final sheet on my google analytics to google spreadsheet reporting with a chart that has the productName dimension, with the 5 channelGrouping dimensions under each productName, on the Y-axis correlating to an X-axis with the itemRevenue metric for each productName.
It can be done static but I would like to run it dynamically.
Its either fixing the reporting to run dynamically on Google Spreadsheet or fixing the google analytics tagging to report all the productNames even if the itemRevenue is 0.
So if anyone has a solution to either one of the following questions it would be very much appreciated...
Question 1) Is there a way to get my ='reportsheet'!C16 for itemRevenue to change its row number when it shifts rows in the reportsheet since new data for productName, in the A column, will be coming into it by alphabetical order?
-or-
Question 2) Is there a way to run google analytics tagging to report in google spreadsheet all of the productNames even if the itemRevenue is 0?

Google Analytics unique events is incorrect

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/

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.

Resources