Firing static event (JS Snipper) - with dynamic user data - is this possible? (we use segment.com)

Hi there,

We use segment.com in our original implementation, which we wish to remain with.

I was able to easily fire an identify call/event with static events with an example, but, I’ll need to pull in database data such as UserID, email address etc. into each JS snippet.

Is using static events the correct way to do such, and will I just need to manually type in the dynamic binding code for each data I want to push through with the JS?

This is the example JS:

analytics.identify("97980cfea0067", {
 name: "Peter Gibbons",
 email: "peter@example.com",
 plan: "premium",
 logins: 5
});

So I need to replace the number, name, email, plan etc. with dynamic data on login / sign up. I’ve tried replicating what I have working in static events in dynamic running JS from flow, but that isn’t working.

Community Page
Last updated: