Create audience based on dynamic user property
Asked Answered
N

3

8

I have an app in which a user can have a "paid" or "free" status. A user can switch from "free" to "paid" (if he does an in app purchase) or from "paid" to "free" if he stops to pay its subscription.

Can I use a dynamic user property to track the information in Firebase ?

In the doc it is not clear if it is allowed to have a dynamic user property value that can change over time (https://support.google.com/firebase/answer/6317519?hl=en)

If it is not a good practice, how is it possible to do such a thing ?

Thanks

Nemato answered 9/8, 2016 at 8:4 Comment(1)
I am also in kind of the same situation. How did you handle the scenario?Clausius
A
4

As mentioned, user is permanently in an audience and when property changes it will be part of multiple audiences based on the same property, assuming there is an audience for all property values.

I have found that one way to work around this is to create a copy of an audience and delete the original one every once in a while. It would be even better if Firebase allowed resetting the audience content.

This works if the users are active and the audience will be re-gathered quickly. It will not work if you need the audience for reaching old inactive users.

Abulia answered 5/9, 2017 at 12:46 Comment(2)
This is completely undocumented from what I can tell—thank you.Electricity
Users can now be removed from an audience as of December, 2018 firebase.googleblog.com/2019/01/…Beverly
C
2

User property is a perfect choice for that.

The way user property work is that, once you set a user property, all the event track afterwards "contain" the value of that user property (BigQuery export format makes it quite obvious). In practice it mean that if you do (UP = User Property):

  1. Set UP "subscription" to "free"
  2. Track events like "watch_film" or whatever
  3. Set UP "subscription" to "paid"
  4. Track events [...]

All the events in step 2 are "within" the UP "subscription=free" and all the events in 4 are "within" the UP "subscription=paid".

This let you clearly identify in Firebase dashboard or in BigQuery what are the event triggered under which UP. In the dashboard you should use the "Filter" option to filter by UP as explain here.

Calvo answered 9/8, 2016 at 9:32 Comment(4)
Related to Dan answer, it does work fine and you should not create an audience, but instead use the option to filter by user property as I explain at the end of my answer. There is no need for audience in that case. That filtering will work fine with dynamic user property (that change value over time)Calvo
Actually I do need an audience because I would like to send a different Remote Configuration depending on the user status. And i cannot send different configuration value based on use property, only based on an audience...Illnatured
Indeed Remi, In that case you would need and audience or for Firebase to let you target remote config configuration based on user property. What you could also do is have 2 keys for each key you have in remote config, one for paid, one for free, like: my_param_paid 10 my_param_free 20 And when you get the value from remote config you append at the end of the key name the value of the user property (free or paid). But it's far from ideal if you have hundreds of keys ...Calvo
@RémiPradal We are trying something similar in our app but we have noticed that once the user property is set it takes at least 10-12 hours for firebase remote config to start sending the values for the specific audience. Developer mode is enabled so there's not throttling in reading the remote config values. Have you noticed similar issues?Transgress
F
2

Since your question refers to creating audiences, you need to be aware that membership in an audience is permanent. In other words, if you have an audience that is defined to be users whose "subscription" user property is "free", once a user is in that audience they will always remain in that audience, even if they make an IAP and their status changes to "paid". The same thing holds for an audience of users whose status is "paid".

Flamethrower answered 7/9, 2016 at 16:46 Comment(6)
Thanks for this precision. So the accepted answer is not correct regarding audience creation. Is there any "correct" way to do it?Susurrate
For defining groups of users whose status may change repeatedly, I suspect you'd want to use BigQuery. Unfortunately that goes outside my area of expertise. Audiences as they work now cannot dynamically represent a group whose members leave and return to the group over time.Flamethrower
Thanks for this answer. That is too bad that it does not work that way :/ Dynamic segmentation seems to be a very basic analytics feature to me... Concerning BigQuery i think it is only useful to analyse "rich" events, not properties.Illnatured
While it's true audiences in firebase aren't dynamic, you do not need an audience in your case, but you need to filter by user property in the dashboard, which will work fine with user property that have dynamic value (changing over time). See the comment on my answer (^_^)Calvo
This is not true anymore. Audiences are now dynamic based on the User Properties: Using Remote Config with Analytics audiences has some limitations when audiences are not based on user properties. Specifically, users become permanent members of an audience after they are assigned to it. With user properties, you can define them so that they are only temporarily true: users are assigned to an audience when the properties are true, and then removed from the audience when the properties are no longer true. (support.google.com/firebase/answer/6317509?hl=en)Neopythagoreanism
scratch my last comment, I was wrong. It is still the case that user lives in an Audience forever. Proof: #51731094Neopythagoreanism

© 2022 - 2024 — McMap. All rights reserved.