What can be the reason the user_id is null in BigQuery? Data from Analytics is sent to BigQuery but the user_id is not passed along. The user_id is sent to Google Analytics but what could be the reason it is not available in BigQuery?
Confirmed by Google Analytics 360 support, the userId only have non-null values in BigQuery tables that are exported from User-ID enabled views in Google Analytics. For non-User-ID views, you only see null values for the userIdcolumn and you have to use a custom dimension to capture User Ids and query them in BigQuery.
In order to check which Google Analytics view you have linked to BigQuery, you can either look at the dataset ID in BigQuery (which is the same as the Analytics View ID) or directly the linked Google Analytics view in Admin > All Products [Property column] > BigQuery in the Google Analytics UI.
I am operating under the assumption that this field is intentionally held out from all Google Analytics -> BigQuery extracts based on the following:
https://support.google.com/analytics/answer/6205850?hl=en#limits
Of particular note, the line "The User ID value can not be queried as a dimension in reports in either the web interface or the APIs". I take this to mean that it will never leave the confines of Google Analytics, including to BigQuery.
I have not been able to get anything but null in my tables either.
Sorry I do not have better news for you!
Related
Google Analytics Google Ads Queries :
Refer to the image provided. How do you get Google Ads/Shopping Search Query data into BQ from Google Analytics? I'm using trafficSource.keyword and filtering for "id==" to get SKU level data.
Thank you
Not all Google Ads data will be available in BigQuery after linking Google Analytics with Google Ads. Yes, on the webpage UI in Google Analytics there is a Google Ads section, but using the BigQuery Data Transfer Service to get Google Analytics data into BigQuery will have a limited selection of Google Ads data.
You can see in the docs here what metrics there are under trafficSource.
adwordsClickInfo nested fields:
https://support.google.com/analytics/answer/3437719?hl=en
Maybe, you can pull some of the data you are looking for with trafficSource.keyword for the keyword and trafficSource.medium, but I don't see in the docs anything aligned with Search Query.
If you want to have more data from Google Ads, you will need to set up a separate pipeline in BigQuery using Data Transfers within BigQuery for Google Ads which acts similarly to how you link Google Analytics with BigQuery. Please see the docs below for this.
https://cloud.google.com/bigquery-transfer/docs/adwords-transfer
We have set up Google Analytics on Requestly Pricing Page. We are already getting site-related information, anonymous statistics, events from the page like
Pricing Page viewed
Coupon Applied Successfully
Duration Changed to Monthly
Premium plan bought
.. so on ..
However, Now we want to track the users who are performing a specific event like
Pricing Page Viewed
but did not purchase premium plan So that we can send targetted emails to those users. If we can get the user IDs (non PII data) from Google Analytics for a particular event, we can map them from our CRM system and get their emails and send them an email.
So, How can we get the list of users associated with some event?
If you are sending the information to Google Analytics as a custom dimension, simply add the second dimension in the Event report.
If you are sending the userId with its defined parameter you have to enable User-ID in your Property and create a User-ID view to see the data in your Analytics reports: https://support.google.com/analytics/answer/3123666?hl=en
Yes we have started sending User Ids to Analytics and now we are able to see User performing events in User explorer but I would like a reverse way. Given an event I want to know which users performed that event.
User ID in Google Analytics
There are three ways to import the User ID in Google Analytics:
customizing the schema field userId
setting up a custom dimension which contains the value
both of the above
In case 1, you can access the data via Google Analytics in User Explorer report, setting up a User ID View.
In case 2, you can access the data in each report that allows to define a secondary dimension.
In both cases, you can access the data in Google BigQuery, if you set up the export.
About your specific need
To know which users performed a specific event I suggest you to create a custom report in which you specify the event in the filters and you set your User ID custom dimension as dimension. This approach of course assumes that you import the User ID at least as a custom dimension.
I'm looking to get information about users sessions from google analytics. Things like:
date of visit
referral
device type
exit page
browser
time on site
etc.
However, Analytics API seems to only offer this data as totals, and not per user. So I can't know how much a specific user stayed on the website for example.
The final result I'm looking for is to tie this data from analytics with the user id from our CRM platform using the google UUID saved in cookie.
Is it possible to retrieve this data from Analytics or you can only access it with Analytics 360?
User level data is not available in standard GA (except in a limited fashion via the User Explorer report which cannot be exported). You'd need to store user id or client id in a custom dimension (you must not store personally identifiable data in GA, even in hashed form, so take care what you use as user id) and then select this as first dimension when you export the data. Obviously this does not help you with data that's already been collected.
I am new to Google Analytics. I have a conversion set up, and I'd like to capture demographics for individuals who convert at e individual level. When a user converts, I'd like to pass the statistics from Google Analytics into my own database, or keep a record of the ID assigned at conversion in Google Analytics and download the data. Is this possible? I want to do analysis on who is likely to convert versus not - age, shopping habits, etc - and link these details back to the type of specific conversion.
Thoughts?
We if want to add add track users at individual level, try creating a Custom diamension and passing the userID everytime you make a GA call.
Next to view the same :- in tables that you view your analytics data, there will be this option called 'Secondary diamention', from the list that appears.. Choose the custom diamension name that you had assigned. Now you will be able to see each row with the userID along slide.
Add user ID to your tracking script
The first step to your question is to add the user ID to your tracking. If you have some way to identify users on your website (ie: through email marketing tool, your CRM, etc), then you should set up user ID tracking. Here is the Google Dev article about that:
https://developers.google.com/analytics/devguides/collection/analyticsjs/cookies-user-id?hl=en
However, basically... you just have to add this to your tracking script (replacing the 'create' line you currently have, replacing "USER_ID" with the user ID your system gives them.
ga('create', 'UA-XXXXX-Y', { 'userId': USER_ID });
In addition, I usually include this UserID as a custom dimension, so that I can view it in Google Analytics and other reports. To do this, first set up a custom dimension for your ID, as a "User-level" dimension. Then just add this after your user ID is available (assuming this is your first custom dimension):
ga('set', 'dimension1', USER_ID);
Connect User ID to Demographics
Unfortunately, the demographics information that Google Analytics provides (under "Audience") is not compatible with custom dimensions (like userID). So, the API only allows you to pull the audience data in aggregate (ie: connected to City, number of users, pageviews of those types of people... etc). If this works for you, check out the GA Query Explorer (below) to try out different combinations of dimensions & metrics to drill down as deep as you can and maximize the information you gain from this demographic info.
Connect Google Analytics Data to Your Database
In order to connect GA data to your database in an automated fashion, you will need to set up some kind of scheduled process that runs a query off of the Google Analytics API. To explore what combinations of metrics and stuff are available, I'd suggest checking out the Google Analytics API Explorer and the Google Analytics API reference material. What I did was set up an SSIS package (using SSIS GoogleAnalyticsSource) as the data source, which made it fairly easy. Then just scheduled that to run daily, populating the data I want into my database.
Alternatively, you could download less complicated reports directly from Google Analytics and import them into your database with something like SQL Server Management Studio.
I am using Google Bigquery to extract data on conversion paths from Google Analytics (GA).
When I analyze these conversion paths from the exported dataset, the last-click conversions match the Acquisition report in GA, but not to the Multi Channel Funnel (MCF) data. Apparently Bigquery doesn't really export raw data, but transforms it by deleting all last direct clicks. like described here: https://support.google.com/analytics/answer/1319312?hl=en.
Is it possible to get the Bigquery data to correspond to Multi Channel Funnel (MCF) conversion path data? To undo the deletion of last non-direct click and get proper 'raw' user level data?
All of the trafficSource fields in BigQuery Export for Google Analytics use campaign attribution as described in this processing flow, which will overwrite direct traffic with the most recent campaign (if there is one and it is within the specified timeout), as you mentioned.
If you are using Universal Analytics, you can adjust the campaign timeout to be shorter than the 6 month default. For example, if you set the campaign timeout to be one day, any direct visits that come in at least one day after a visit with a campaign will be attributed to direct instead of the previous campaign. This can be done with Classic Analytics as well using _setCampaignCookieTimeout. This technique will affect data collection from the time it is implemented going forward.
This thread is rather dated, so I thought I'd update just in case anyone else comes across this same question.
There is a field that was introduced (both in the Google Analytics interface and the BigQuery export) that allows you to match the numbers in the MCF reports. In BigQuery, look for the field trafficSource.isTrueDirect
BigQuery Export Schema
trafficSource.isTrueDirect
True if the source of the session was Direct (meaning the user typed
the name of your website URL into the browser or came to your site via
a bookmark), This field will also be true if 2 successive but distinct
sessions have exactly the same campaign details. Otherwise NULL.