# Work in Progress: How to send data to Google Tag

{% embed url="<https://firebasestorage.googleapis.com/v0/b/savvy-flow-uploads/o/ZH5RO6gKEiwXw7GF3AD6%2FSavvy_(3)_9372531467607306.mp4?alt=media&token=e0755692-ae33-4609-b91c-8245b832f456>" %}

* Create a new custom Data Output and select Manual Trigger Only
* For the first Google Tag event that is triggered on the flow, the following code should be added:

```jsx
function output(userData, context) {
   window.gtag = function(...args) { dataLayer.push(args); }
  return dataLayer.push({ event: 'eventName' }) //replace with the right event name
}
```

* For the rest of the Google Tag events on the flow, follow the structure below:

```jsx
function output(userData, context) {
	//replace eventName with the right event name, add all the properties you need to the same object, an example below
  return dataLayer.push({ event: 'eventName', email: userData.email, questionNumber: `Question 1` })
}
```

* Trigger the data outputs on page complete or page load on the pages where they are needed
