Hey all, *I need to attach global properties to e...
# support
l
Hey all, I need to attach global properties to every event coming in from a Flutter app, including
track
,
identify
and the automatic lifecycle
track
events.
I think Custom Context looks like the best bet for that, but please let me know if there's a better solution. Any idea how to get Custom Context attached to automatic lifecycle events in a Flutter app? Custom Context shows up in
track
events and
identify
events when added to the
options
parameter of those
RudderController
methods. I am adding Custom Context to the
options
parameter in the
RudderController
initialize
method, which I would expect would make them show up in all events, including lifecycle events, but adding it here appears to not do anything as far as I can tell. The docs say that lifecycle events should have Custom Context.
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
Hi Christopher, you cannot use the initialize method to add custom context to your events. You have to add it in the options object of the event and send it with each event. You can use this
l
Thanks @shy-kite-21035! Is it possible to add custom context (or some other way of setting arbitrary global properties) to the lifecycle events in Flutter?
m
Hi James sorry, I missed the life cycle events part. I am checking with the team on this.
Hi James, the team confirmed that this ability to send custom properties for the life cycle events is currently not supported.
l
Thanks for checking Ranganath! Without that feature I believe there is no way to add arbitrary data to all lifecycle events?
m
If it is something fixed for example like a campaign_id then you could use a user transformation to add it, but for user/device specific information it is not possible.