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
- Go to the Website Audiences tab in the left navigation menu.
- Click New Audience.
- Under Audience Type, select URL Visited.
- 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.
- Mark the checkbox ‘This is a conversion audience' if you wish to specify this as a Conversion Audience (track buyers for example).
- In the URL pattern field, type a plus (+) and then paste the copied ID.
- Enter your desired Duration: the number of days that someone remains an active part of the audience.
- 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) {}
</script>
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?