Tracking user interactions that don’t result in a page load, like button clicks, form submissions, or specific widget interactions, is crucial for building highly targeted audiences. In AdRoll, you can track these interactions using either User Events or Event JS Match audiences. This guide explains the difference between the two and outlines how to create and implement them.
Which Event Type Should I Use?
While both options allow you to track on-page events, they function differently depending on your pixel setup and tracking needs.
| Feature | User Events | Event JS Match |
|---|---|---|
| Pixel Version | Standard (Pixel v2) | Legacy (Pixel v1) |
| Best For | Modern implementations and standard event tracking across your site. | Tracking conversions on separate websites where you can't place the pixel, or specific legacy setups. |
| Trigger Behavior | Highly customizable based on your website's event logic. | Triggered instantly upon button click, regardless of whether a subsequent action (like a form successfully submitting) actually completes. |
| URL Change | Does not require a URL change. | Does not require a URL change. If the URL does change and reload, use a standard URL Visited Audience instead. |
Who can access
Access to create a Event-based audiences is available with all packages.
| Your Package | Event-based Audiences |
|---|---|
| Account Based Advertising | Included |
| Account Based Marketing + Advertising | Included |
| Account Based Marketing | Included |
| Starter (Legacy) | Included |
| Standard (Legacy) | Included |
| Professional (Legacy) | Included |
| Ultimate (Legacy) | Included |
| Free Tier | Included |
Create a User Event Audience
User events allow advertisers to track audiences based on specific interactions on their websites. These events allow advertisers to track generic events across the site, ideal for Single Page Applications (SPAs), as well as events on specific URLs. The scope of the user events can be defined on segment creation.
Step 1: Create the Audience in AdRoll
- Log in to AdRoll ABM and navigate to Audiences > Website Audiences and select Create Audience.
- Select Audience Type = User Event.
- Enter your desired Audience Name.
Step 2: Define the Event Scope
-
Choose how you want to track the event:
- Site-wide: Add a wildcard to track the same event across the entire site.
- Specific Sections: Add a URL path to track the event only on specific pages (e.g., matching the URL path /womens).
- If the event will track conversions, tick ‘This is a conversion audience’. Leave unchecked for any other event type.
- Enter your desired Audience Duration (in days) under How long to keep a person in this audience. If you aren't sure, learn more in this article.
- Click Create Audience.
Multiple Conversion Points
You can create many user events of the same type combined with different URL paths, which is highly useful for sites with multiple conversion points.
Step 3: Implement the Code Snippet
Contact your developer to place the relevant code snippets on the call of the specific events.
-
For generic page views:
adroll.track("pageView"); -
For conversion events:
adroll.track('purchase');
Automatic Event Sorting
If any user events have URL paths associated with them in the dashboard, the system will automatically sort them. Conversion segments can also pass extra information for reporting purposes. Please refer to this article for further information.
But what happens when we have multiple events of the same type to track without distinguishing paths?
What are Event JS Match Website Audiences
After placing our Pixel on your website, we will start capturing your visitors' data to turn it into Website Audiences. Event-based Website Audiences segment your website traffic based on an event triggered by a visitor, such as a button click, that does not result in a change in URL. To create this audience type, you have to add a JavaScript code snippet to the onClick attribute of your JavaScript button.
When to use an event-based website audience:
- When you want to track an Audience defined by users clicking on a button on your website, and clicking the button that does not result in a URL change (and page load). If there is a URL change and the page reloads you should track the audience by creating a simple URL-based Audience.
- Tracking conversions that need to be completed on a separate website, which you can’t place the pixel on (this is a common scenario for event promotions)
Event-based Website Audiences are triggered when your visitor clicks the button, regardless if there is a subsequent action that is not completed. For example, if you create an Event-based Audience based on the "Submit" button at the end of a form fill, the event will be triggered and the visitor will be added to this audience even if the form is not submitted and returns an error because some required fields were not entered. You can however also specifically trigger the event code upon a form submission, by relying on a different trigger instead of a click.
Create Event-based Website Audiences
Step 1: Create an Event JS Match Audience Type
- Log in to AdRoll ABM and navigate to Audiences > Website Audiences and select Create Audience.
- Select Audience Type = Event JS Match.
- Enter your desired Audience Name.
Step 2: Copy the snippet to your clipboard
- Click ‘Copy ID to clipboard’ to prepare your snippet.
- Paste the event ID as your segment_name. The snippet will look as follows:
adroll.track('pageView', {"segment_name": "4e8fd9c2"});
- If the event will track conversions, tick ‘This is a conversion audience’. Leave unchecked for any other event type.
- Enter your desired Audience Duration (in days) under How long to keep a person in this audience. If you aren't sure, learn more in this article.
- Select the Page Type (it can be left as default if no options match)
- Click Create Audience.
Contact your website engineering team
To activate the event pixel, have your developer place the relevant code snippet directly within the specific event call (such as an onClick function). This method allows the event to bypass the generic pageView trigger, ensuring the audience is accurately sorted based on matching IDs. Since the ideal setup depends on your site’s architecture, we recommend consulting your engineering team to decide whether to trigger the script inline or via an external JavaScript file..
Implementation Guidelines
- Important Prerequisite: Both User Events and Event JS Match require the main AdRoll tag to be present on your website. They will not collect data if implemented on their own.
- Handling Multiple Events: If you are implementing multiple pageView events (or other event types), your main pixel will still require its own pageView event. Any extra events you configure should be set up in addition to the main pageView. Note line 23 in the following example script:
- Passing Extra Parameters (Event JS Match): For conversion segments that require passing extra parameters (like revenue or order IDs), please use the snippet variant below. Remember to replace VAR with your actual variables to pass the data dynamically.
<script type="text/javascript"> try{ __adroll.track("pageView", {"segment_name":"Enter Segment ID here", "conversion_value": VAR, "adroll_currency": VAR, "order_id": VAR}) } catch(err) {} </script>
Extra Considerations for Google Tag Manager (GTM)
The built-in AdRoll tag in Google Tag Manager does not currently support __adroll.track.
- If you are creating an Event JS Match Audience using GTM, always use the Copy Snippet to Clipboard option instead of the "Copy ID to clipboard" option to ensure it functions correctly.
Advanced Troubleshooting
Below are Advanced troubleshooting steps you can take to confirm if the dedicated Pixel for an event-based website audience is firing correctly. These instructions apply only if the user-triggered event that you are troubleshooting reloads the page or directs the user to another URL. If the page does not reload or directs the user to another URL, you should use this PixelPal Guide to troubleshoot your event-based Pixel implementation.
- Open your Chrome browser.
- Go to the URL on your website that has the Event-based audience implemented.
- Open Developer Tools by right-clicking your mouse and clicking Inspect.
- Go to the tab Network.
- Mark the checkbox Preserve log.
-
In the network call search box:
- Type name= → Use this option if you DO NOT know the event segment EID or snippet pattern ID.
- Enter the event segment EID → Use this option if you know the event segment EID.
- Perform a conversion test by clicking the button that you are tracking with this Event-based Audience.
- You will see the network calls under the “Name” column → click the adroll call
-
You can confirm the Event-based pixel is firing correctly in a couple of ways:
- Option a) Click Headers → General → Request URL → search for “name=[snippet pattern ID]”
-
Option b) Click Headers → General → Response Headers → search for the segment details:
- x-segment-display-name: name of your audience segment.
- x-segment-eid: audience segment EID.
- x-segment-name: snippet pattern ID.