Work in Progress: How to send data to Google Analytics
Create a new custom Data Output and select Manual Trigger Only
Add the following code:
function output(userData, context) {
if (!window.analytics) return
const props = {
//here is where all the properties and values go, some examples below:
flowId: 'savvy flow',
email: userData.email
}
window.analytics.track(`event name`, props) //here is where the event name goes
}
Trigger the data output on page complete or page load on the pages where it is needed
PreviousWork in Progress: How to send data to Google TagNextWork in Progress: How to Fetch User Location Data to use in your Flow
Last updated