eager-peach
eager-peach15mo ago

google analythics4

Im tring to solve isue with google analythics. Mby its possible to pass google tag or analyhics4 user.id or campaign.id to voiceflow? Tried to store this id to local storage but voiceflow doesnt exit his chat window and can not acces local storage. I need somehow to track the source/traffic on costumer
2 Replies
Tico | Voiceflow Assistant
To identify a user and share that information with your Voiceflow agent, you can pass a userID. This value will be set as the built-in userID variable in your Voiceflow agent. Here’s how you can do it: 1. Store the User ID: Ensure you have the user ID stored in a variable. 2. Pass the ID to Voiceflow: Use the window.voiceflow.chat.load function to pass the userID parameter. Here’s an example:
// Assuming you have the user ID stored in a variable called userID
const userID = 'your-user-id'; // Replace with actual ID

window.voiceflow.chat.load({
projectID: 'your-project-id', // Replace with your actual project ID
url: 'https://general-runtime.voiceflow.com',
versionID: 'production',
userID: userID
});
// Assuming you have the user ID stored in a variable called userID
const userID = 'your-user-id'; // Replace with actual ID

window.voiceflow.chat.load({
projectID: 'your-project-id', // Replace with your actual project ID
url: 'https://general-runtime.voiceflow.com',
versionID: 'production',
userID: userID
});
This will set the user ID in Voiceflow, allowing you to track the user across sessions. For more detailed information, you can refer to the Voiceflow Customization & Configuration documentation.
eager-peach
eager-peachOP15mo ago
Should i put also script in my server machine or just send api with user.id and event name?

Did you find this page helpful?