How is Firebase Analytics User Id generated?

3,269 views
Skip to first unread message

Erling M

unread,
Aug 9, 2016, 10:22:02 AM8/9/16
to Firebase Google Group
I'd like to understand how the Firebase Analytics is generated but I haven't been able to conclude it using the public documenation. Does anyone here know?

- Erling

PS.  I know it can be set manually using setUserId. DS.

Steve Ganem

unread,
Aug 10, 2016, 9:56:20 AM8/10/16
to Firebase Google Group
FIrebase Analytics generates a random GUID and designates it as the App Instance ID.  As the name suggests, this identifies a unique instance of the application on a device, so that if the app is uninstalled and re-installed, it will have a distinct App Instance ID.

Separately, as you mentioned, developers may supply their own User ID which has different semantics.

Erling M

unread,
Aug 15, 2016, 10:51:31 AM8/15/16
to Firebase Google Group
Thanks Steve, so this is then totally random with no relationship to Android Id or the Advertisement Id then? Please confirm. 

/Erling

Steve Ganem

unread,
Aug 15, 2016, 11:03:45 AM8/15/16
to Firebase Google Group
Yes, that is correct.  Note, however, that the Advertising Id is also captured and optionally exported to a linked BigQuery project (along with the app instance ID and the user ID, if available).

On Aug 15, 2016 7:51 AM, "Erling M" <erling.martensson@sonymobile.com> wrote:
Thanks Steve, so this is then totally random with no relationship to Android Id or the Advertisement Id then? Please confirm. 

/Erling

--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/Dm0e1KxsuVE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/8c2efac5-021f-4f74-8eda-608a164840cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-Steve

Erling M

unread,
Aug 16, 2016, 9:54:55 AM8/16/16
to Firebase Google Group
Ok, so in case I would want to avoid collecting the Advertising Id how would I do that? Please explain if it differs when using BQ export and when not.

About the App Instance ID how is that created?

/BR, Erling 

Steve Ganem

unread,
Aug 16, 2016, 9:56:20 AM8/16/16
to Firebase Google Group
That's a randomly generated GUID, generated for each new instance of the app on a device.

--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/Dm0e1KxsuVE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Steve Ganem |
 Product Manager, Firebase Analytics | sga...@google.com | (714) 861-0569

Erling M

unread,
Aug 16, 2016, 11:37:33 AM8/16/16
to Firebase Google Group
Ok thanks. 

And in case I would want to avoid collecting the Advertising Id how would I do that? Please explain if it differs when using BQ export and when not.

Steve Ganem

unread,
Aug 16, 2016, 11:45:10 AM8/16/16
to Firebase Google Group
Advertising identifiers are automatically collected when available, but they are only optionally exported to BigQuery based on your selection when you establish the link.

On Aug 16, 2016 8:37 AM, "Erling M" <erling.m...@sonymobile.com> wrote:
Ok thanks. 

And in case I would want to avoid collecting the Advertising Id how would I do that? Please explain if it differs when using BQ export and when not.

--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/Dm0e1KxsuVE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.

Erling M

unread,
Aug 17, 2016, 10:58:13 AM8/17/16
to Firebase Google Group
Ok, in case I would prefer not collecting the Advertising Id at all, is there any way to do that?

Secondly, I haven't been able to conclude how to optionally export the Adverstising ID, can you explain some more details on how this is done? (Currently my data seems not to include it but I cannot understand how to add it if I would prefer that)

BR,  Erling

Steve Ganem

unread,
Aug 17, 2016, 11:09:15 AM8/17/16
to Firebase Google Group
Analytics is all or nothing.  You can't selectively discard the Advertising Id.

When you choose to link to BigQuery, you'll see an option to export advertising identifiers to BigQuery (which defaults to OFF). See the attachment.
Screen Shot 2016-08-17 at 8.07.26 AM.png

Erling M

unread,
Aug 18, 2016, 10:31:30 AM8/18/16
to Firebase Google Group
Aha thanks Steve. 

This dialog was for sure shown during my linking I just didn't remember the advertising id checkbox. That explains why my prototyping data does not include it. Great. Now it's clear.

What is the reason behind the design to have adverstiding id always sent when using Firebase Analytics, is it critical for the functionality?

BR, Erling

Steve Ganem

unread,
Aug 18, 2016, 10:32:52 AM8/18/16
to Firebase Google Group
The advertising id is critical to a number of features including attribution and demographics.

--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/Dm0e1KxsuVE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Erling M

unread,
Aug 18, 2016, 12:21:58 PM8/18/16
to Firebase Google Group
I see. Thanks for clarifying this. 

/BR, Erling

Erling M

unread,
Sep 13, 2016, 11:12:38 AM9/13/16
to Firebase Google Group
Realized I had a follow-up question on this. Looking into the BigQuery export of Firebase Analytics I do not see the advertisement id in the BQ schema. Am I missing something or is it deliberately not part of the table?

Best,

  Erling

Steve Ganem

unread,
Sep 13, 2016, 11:21:05 AM9/13/16
to Firebase Google Group
This is the field in the schema :

user_dim.device_info.resettable_device_id

Please note that this is optionally exported.  At linkage time, you were presented with the option to export Advertising Identifiers.  This option defaults to NO and so you would have to select it.  If you feel that you have made an error in this regard, you can unlink and re-link your project to BigQuery at which point you can choose affirmatively to export advertising identifiers.

--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/Dm0e1KxsuVE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Erling M

unread,
Sep 14, 2016, 11:46:51 AM9/14/16
to Firebase Google Group
OK, now I understand. Thanks Steve.

/Erling


Reply all
Reply to author
Forward
0 new messages