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.

 

Create a User Event Audience

User events allow you to track audiences based on specific interactions on your websites, and are primarily determined by the main pixel you have in place. These events allow you to track generic events across the site, ideal for Single Page Applications (SPAs), as well as events on specific URLs. This method is best when your website has distinctive URLs that can be used to define your audience rules. 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. While standard event pixels can also be called after a button click (provided there is a validation process), Event JS Match is specifically used when you lack distinctive URLs and need to create uniqueness by using specific IDs. 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.

 

Troubleshooting

For verifying and troubleshooting your implementation, we recommend using PixelPal. As our "source of truth" for the pixel, PixelPal handles all versions of events, including both User Events and Event JS Match audiences.

To use it, simply install the Chrome extension and perform a test by triggering the event on your website (such as clicking the button you've tagged). PixelPal will display the event's audience EID and any associated rules, confirming that the appropriate calls are being recorded successfully.

Learn more about how to verify your website connection with PixelPal.

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