User Events vs. Event JS Match Audiences

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.

 

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 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. 
  • 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?


Create an Event JS Match Audience

Event JS Match 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 piece of code to the onClick attribute of your JavaScript button. This audience type is also useful for tracking events such as form submissions when there isn't a thank-you page after the form is submitted.

 

Step 1: Create the Audience in AdRoll

  • Log in to AdRoll 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. 
  • 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 JS Match 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 JS Match 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 JS Match 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.

Was this article helpful?
1 out of 6 found this helpful

Articles in this section

See more
Chat with a support agent
Monday to Friday 24/5 UTC
Send a support email
Monday to Friday 24/5 UTC