Send an event

This action lets you send an event to Google's servers for your accounts. An event is typically an interaction on the page you want to track that may or may not require a browser refresh, such as a purchase, form submission, video view, or button click.

Event Settings

Below is a list of settings and their descriptions that apply to the event for all accounts.

Event Name (Action)

The event name, or event action in Google Analytics, should be a descriptive value of what the interaction was. It is recommended to use one of the names Google has provided, but you can also use your own event name if you prefer.

Event Category

The event category is only used in Google Analytics. If you've used one of the names provided by Google, the event category will be automatically populated with a matching default category. You may still override this value and pass in your own category. If you do not pass your own category and the event action name is not on the default list, engagement will show up in the reports.

Event Label

Event label, like event cateogry, is only used in Google Analytics. If you've used one of the names provided by Google, the event label will be automatically populated with a matching default label. You may still override this value and pass in your own label. If you do not pass your own label and the event action name is not on the default list or there is no default label, not set will show up in the reports.

Event Value

The event value is usually the monetary value that is associated with the event. For example, a purchase event should send a value of the total revenue. The value should be a number. Any strings passed will be converted to a float, and if the string cannot be converted properly a value of 0 will be passed. Do note that some tools, like Google Analytics, do not accept floats. These tools will automatically round the value, so if you pass 69.7, you should see 70 passed as the value.

Non-Interaction Event

Non-interaction events are specific to Google Analytics. When checked, the event sent will not impact the bounce rate for the visitor. E.g. if the user is on the homepage and a modal pops up, when the non-interaction event setting is unchecked, the modal view would be considered an interaction and your homepage bounce rate drop down to 0%. Conversely, when the non-interaction event setting is checked, the bounce rate would be more inline with what you'd consider a bounce to be - as the user did not interact with the page or go to another page.

Event Callback

You can call custom code when the event gtag command has fired. This callback does not guarantee that the data has been sent to the account, nor can you prevent / stop the data from being sent. The gtag function will be available via an argument to your callback code. E.g. you can log to the console that the event fired and show the gtag function:

console.log("my event fired!", gtag);

Custom Data Fields

Learn more about custom data fields and how to pass e-commerce data via these fields.

Account Specific Settings

Below are the settings that are specific to each account.

Enable / Disable Accounts

You can choose which accounts to send the event to. When a new event action is created, all accounts are enabled by default. Toggling the checkbox will allow you to prevent the event from being sent to that account.

You can also use a data element to conditionally call the event for an account. Your data element should return a boolean true or false to enable or disable the event call. If a data element is used, the checkbox cannot be unchecked until the data element is removed.

Conversion Label

For Google Ads and Google Marketing Cloud accounts, you can pass in a conversion label. This label can be found within the product's interfaces. The code output may look something like this:

// Google Ads
gtag("event", "conversion", {
    "sent_to": "AW-123456/aBcDefG12456",
    "transaction_id": ""
});

// Google Marketing Cloud
gtag("event", "conversion", {
    "sent_to": "DC-987654/group1/thank123+transactions",
    "transaction_id": ""
});

The conversion label value you should input would be anything after the first /. If you include the account ID on accident, it will be removed, but it's best practice to remove this first. For example, the AdWords account AW-123456's conversion label would be aBcDefG12456, while the Google Marketing Cloud account DC-987654 conversion label would be group1/thank123+transactions.

Starting in version 1.1.5, multiple conversion labels for a single account can be passed at the same time via a comma delimited list.

Last updated