I’m trying to send user data collected in WeWeb to Brevo Conversations using their BrevoConversations(‘updateIntegrationData’, data) API. According to the Brevo documentation, the data object can contain properties like email, first name, phone, etc., as strings, numbers, booleans, or null. Custom properties can also be synced with Brevo Contacts if they match existing attributes.
Has anyone successfully integrated user data from WeWeb into Brevo Conversations? If so, could you share a working example or best practices for achieving this? Specifically, I’m looking to:
• Collect user data in WeWeb (e.g., email, name, custom properties)
• Pass that data to Brevo Conversations using the JavaScript API
BrevoConversations('updateIntegrationData', {
email: 'cowardly_lion@yahoo.com', /* e-mail changed */
firstName: 'John', /* first name changed */
lastName: 'Doe', /* last name changed */
phone: null, /* phone number removed */
notes: 'Looking for courage...', /* notes property created */
/* any number of custom properties */
'trip wish list': 'Going to Oz with friends'
});
I don’t understand if I need to add it at the page level automation or on click automation, when I tried at the page the level there is a error message in the log telling me brevoconversation is not identified (I set it up with Google tag manager)
Hey, you will likely need to spread out how you work with this library over different steps. For example, you might load the brevo library on page load (or in the header like you do here). Remember that loading the library attaches it to your window, so you can access it in workflows in the future.
Later in the lifecycle, say, after the collections have loaded or on click, you might run the updateIntegrationData method to fill in the data you need.
I’ve made videos on integrations like this before on State Change Youtube - you might find the model helpful. We crack integrations like this regularly within minutes in our State Change office hours as part of our focus on the hardest 5% of these projects.
I agree with @raydeck. As for Google Tag Manager + Brevo, as far as I know, there is no need to paste code in WeWeb. You can paste the code in Google Tag Manager and then push an event from the Google Tag Manager plugin with the user data to Brevo.
At this point, I think it depends on how much you know Google Tag Manager and Brevo. From the WeWeb side, we provide a way to integrate both and to pass data.