Event-Based Audience

Important: This segment type works only with V1 AdRoll Pixel. It is recommended to first find out which version of the pixel you are using. Please check out How can I check the version of my Pixel? 

Event-based audiences are based on click events rather than on pages. 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. 

Note: Event-based audience (for V1pixel) works only when the __adroll.record_user function is invoked in the AdRoll Pixel.

When to Use an Event-Based Audience

  • JavaScript buttons
  • Tracking conversions that need to be completed on a separate website (common with event promotion) 

Create an Event-Based Audience

  1. Go to the Website Audiences tab in the left navigation menu.
  2. Click New Audience.

  3. Under Audience Type, select URL Visited.
  4. Type your Audience Name, then click copy ID to the clipboard. This pulls a unique ID to be used as the URL rule placeholder for this audience.
  5. Mark the checkbox ‘This is a conversion audience' if you wish to specify this as a Conversion Audience (track buyers for example).
  6. In the URL pattern field, type a plus (+) and then paste the copied ID.
  7. Enter your desired Duration: the number of days that someone remains an active part of the audience.
  8. Click Create Audience

Prepare the Script

Below is the script, called an event pixel, that you will need to tie to your event audience.

Update the event pixel by replacing in quotes ("Enter Segment ID here") with the unique ID we generated for you (Step 4 from above). Note: Do not add the ‘+’ sign when entering the segment ID.

<script type="text/javascript">
try {
__adroll.record_user({"adroll_segments": "Enter Segment ID here"});
} catch(err) {}

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.

The best practice here will depend on the existing website structure. Consult your technical team. 

Counting All Clicks

Event-based audiences are triggered when a visitor clicks the button, regardless of whether the action successfully goes through. For example, when a user attempts to submit an incomplete form with the required fields, it will count as a click even if the form returns an error.

Exclude an Audience

Excluding an audience from a campaign means that we won't show ads to people in that audience. If you wish to exclude this audience segment from the campaigns so that the ads will not be shown to these users, check out Can I exclude an audience segment from my campaign?

Was this article helpful?

We're sorry to hear that!

Please tell us why.