Google Analytics - UserID report get data - google-analytics

I've setup of google analytics USER-ID report where i send user id's, i want to get the details of each any userid using get or post request

It's not possible. Google analytics only utilises User Id for sessions unification through different devices. User I'd is not exposed in the reports. Consider using unique custom dimensions values to split sessions across users

Related

Can multiple Google Analytics account have same profile ID?

Is is possible that multiple Google Analytics accounts (e.g abc#gmail.com and xyz#gmail.com) have same profile(view) Id or is it unique across all the Google Analytics accounts?
I am sure that web property is unique (as it is used to collect data from web/app) across multiple GA accounts but I am not sure about the profile IDs.
Here is the use case:
I am developing the web application which allows any user on internet to authorise his/her GA account and extracts the data from GA. The web application uses GA Reporting API V4 and performs caching mechanism based on Google Analytics username (i.e. abc#gmail.com).
Now let's profile ID 123 from abc#gmail.com is shared with xyz#gmail.com and both the users wants to extract the same data for same profile 123 from GA. Now since the caching is done on GA Username, web application will consider it as two different requests but if caching is done on profile id, only one of the two requests will be considered as new request and the other will be served from cached result. That is why I need to know whether GA profile ID is unique across multiple Google Accounts or not considering profile ID is not shared with any other account.
===== Edit =====
I have asked the same question to Google Advertiser community. Here is the link for reference.
https://www.en.advertisercommunity.com/t5/Google-Analytics-Account-Access/Can-multiple-Google-Analytics-account-have-same-profile-ID/td-p/888552
Correction:
Google analytics accounts are not based upon a single gmail address.
When abc#gmail.com logs into the Google Analytics website they may have one or more Google Analytics Accounts listed. Google Analytics accounts can be websites or mobile data based. A user can be added to more then one Google analytics account.
Lets say abc#gmail.com has a website. Superwebsite.com they create a google analytics account for tracking of that website. Now abc#gmail.com would like to share the data in that google analytics account with a new employee xyz#gmail.com. abc#gmail.com simply needs to add xyz#gmail.com as a user and they both have access to the Google Analytics account.
Answer:
A google analytics account id looks like this 59183475 and yes is probably unique Globally across all google analytics accounts. Web properties are used to actually insert the data into google analytics and look like this UA-59183475-1 they are also unique globally.
There is no way to know for sure unless you ask someone at Google. However I suspect that profile id is some kind of composite primary key. being that it will be unique across account - web property - profile id. I have no way to prove that its just a guess on how I would create the database personally.

Track user activity using google Analytics

I am new to Google Analytics.
We would like the analysis of our data data to focus on specific brand promotion, in my application I have the data from twitter, facebook and instagram. I would like to track user activity and collect data on click event such as
Title of the post
date of the post
channel(twitter,facebook,instagram)
etc.
I want to use an application unique user id and analyze the data based on a specific userid.
I have read custom Variables in Google Analytics, but I am not sure about how much analytics will help me to tracked above information.
From the Google Analytics Terms of Service:
Privacy.
You will not (and will not allow any third party to) use the Service
to track, collect or upload any data that personally identifies an
individual (such as a name, email address or billing information), or
other data which can be reasonably linked to such information by
Google. You will have and abide by an appropriate Privacy Policy and
will comply with all applicable laws, policies, and regulations
relating to the collection of information from Visitors.
That being said if your website has a Userid that can not be used to directly map back to a user. You could place that user id into a custom dimension.
You need only configure it in your Google analytics account then add a tracking code like this to your site
ga('set', 'dimension1', 'XXXXXXXX');
Then you will be able to use user id as a secondary dimension in most of the Reports on the website.

Tracking personal user identifiable information via Google Analytics

I'm wondering if it is possible to receive user specific information (frontend or backend) from Google Analytics.
For example: A user arrives on our site and we can read from Google Analytics, hey this person is XX years and has these interests.
I've read some blogs about Google Analytics and the cookies, from which it should be possible to extract the unique user ID (NOT given by us but by Google Analytics). Maybe that's where the identification could start.
Is it possible and if, how?
Kind regards!
What you are referring to is the Demographic and interest reports. This data comes to Google by the way of DoubleClick cookie.
What is the Double click cookie?
DoubleClick uses cookies to improve advertising. Some common applications are to target advertising based on what’s relevant to a user, to improve reporting on campaign performance, and to avoid showing ads the user has already seen.
User ID in Google analytics:
User ID enables the analysis of groups of sessions, across devices, using a unique, persistent, and non-personally identifiable ID string representing a user.
Note: The user id is used internally by Google Analytics its not possible for you to see this User id via the Website or the API.
Personal information:
The Google Analytics terms of service, which all Google Analytics customers must adhere to, prohibits sending personally identifiable information (PII) to Google Analytics (such as names, social security numbers, email addresses, or any similar data), or data that permanently identifies a particular device (such as a mobile phone’s unique device identifier if such an identifier cannot be reset), even in hashed form. Your Google Analytics account could be terminated and your data destroyed if you use any of this information.
Answer: It is not possible to receive personal user specific information from Google Analytics, while it is possible for you to send this information yourself in the form of a custom dimension it is not advisable because it is against the terms of service.

Show Google Analytics Data to Users

I am building a website and every user will upload images. The users' images will have unique IDs. The users will have their own dashboard with analytics.
I want to provide every user with analytics data (unique visitors, page views, bounce rate, etc.) for their own information. I am thinking of using google analytics for this instead of building something on my own.
Can this be done through google analytics legally? Are there any restrictions on showing such analytics information directly to the user?
The legal restriction with the Google TOS is that Google must not have any way to connect collected data to an existing person ( "data which can be reasonably linked to such information by Google", TOS §7). You are allowed to store anonymous IDs that can be matched in your own backend to persons as long as they cannot be resolved to individual users by Google.

How can I generate a GA tracking code programmatically?

How to generate Google Analytics tracking code programmatic-ally?
I am new to Google Analytics API, can someone please help
It is NOT possible to create new Google Analytics accounts or profiles programmatically using the existing APIs.
There are two APIs available, the Data Export API and the Management API. However, they are bot read-only.
With the Google Analytics Data Export API, you can develop client applications to request data from an existing Analytics profile for an authorized user, and refine the results of the request using query parameters. Currently, the Data Export API supports read-only access to your Google Analytics data.
Currently, the Management API supports read-only access to five components of the Google Analytics Management system: Account data,Profile data, Web property data, Goal data, Advanced segments
Seems like it's finally possible in 2021 with alpha api.
https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties/create#authorization-scopes
It's not currently possible to create Google Analytics accounts automatically at the moment but generating the tracking code is possible.
The only real variation between the tracking code generated each time you create a profile for a new domain is the web property ID. This is in the format UA-XXXXXXX-X. Each X is a number - the first 7 numbers are the account number and the number after the last dash relates to each web property set up for the account.
You can use the accounts feed of the API to get a list of accounts and their profiles. If an account only has one profile then it's possible to use the web property ID of it to automatically generate the tracking code. However, if there's multiple web properties then you would need a way to decide which one to use (present the user with a selection list etc).

Resources