2
votes

Is is possible that multiple Google Analytics accounts (e.g [email protected] and [email protected]) 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. [email protected]).

Now let's profile ID 123 from [email protected] is shared with [email protected] 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

1
Given that the API takes the view id to extract data from a property, not the property id, I'd say it is a safe bet that they are unique.Eike Pierstorff
As I stated in my answer. Profile id itself is probably not unique across the world. It is probably a composite key over at the very least web property and profile. You will need to save both as your primary key to identify an account. However only google can answer that 100% so this question is probably primary opinion based. Note I can ask but I don't know if they will tell me :)DaImTo
Yes @DaImTo . I had the same thought that combination of Account ID / Web Property ID and Profile ID will always be unique. But I just wanted to avoid asking one addition parameter i.e. Accound Id from users.dikesh
web property and profile id should be enough. And you should just be displaying the last from accountsummeries to them and let them select which one. This will avoid any input errors on their part. technically you could just ask for a profile id and scan the account summaries for the user and find the info you need that way.DaImTo

1 Answers

1
votes

Correction:

Google analytics accounts are not based upon a single gmail address.

When [email protected] 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 [email protected] has a website. Superwebsite.com they create a google analytics account for tracking of that website. Now [email protected] would like to share the data in that google analytics account with a new employee [email protected]. [email protected] simply needs to add [email protected] 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.