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.

When to use an Event JS Match 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 Visited 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 JS Match 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 JS Match 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 JS Match Audiences

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.
  • 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.
  • Only if this audience is a Conversion Audience, check the box labeled This is a conversion audience. If you aren't sure, learn more in this article.
  • Click Create Audience.

Step 2: Copy the snippet to your clipboard

 

Step 3: Activate the Event Pixel

The event pixel should be triggered through the onClick function of the button on the page(s) where the event occurs. As an option, many of our advertisers place the script in an external JavaScript file that gets called during the click event.

  Contact your website engineering team

The best practice here will depend on the existing website structure. Consult your technical team to determine the best implementation option depending on your website structure.

 

Basic Troubleshooting

Ensure that your Pixel is active and fires on every page of your website. Your Pixel can only detect activity on a page if it is active on that page. Learn more about how to troubleshoot your Pixel in this article.

Verify that you have placed the event pixel in the onClick action of your JavaScript button.

 

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