User Context

Tracking user context with optional fields

๐Ÿ“˜

The only mandatory fields if the user id, the other fields are optional attributes

Creating custom user and subscription attributes can be done under Settings > Attribute Settings

const context = {
    user: {
        id: '7d8da9a5-53f3-4bc0-8921-1cceecb8107', // mandatory
        email: '[email protected]',
        name: 'John Doe',
        role: 'admin',
        image: 'https://example.com/images/user12345.jpg',
        phone: '+1234567890',
        timezone: 'America/New_York',
        signUpDate: 1707164462000,
        location: {
            country: "USA",
            region: "Northeast",
            state: "New York",
            city: "New York City",
            postalCode: "10001"
        }
        // add custom attributes here after creating them in your subscription

    },
    subscription: {
        id: 'subscription-12345' // mandatory
         // add custom attributes here after creating them in your subscription
    }
}

eucera('when', 'ready', () => {
    eucera.identify(context);
});


Whatโ€™s Next