Universal Pixel Rules
Universal pixel rules control what happens when the pixel is fired. By default, any actions you define for the pixel, such as updating an audience or triggering conversion attribution, occur any time the pixel fires. Rules let you control the precise conditions for triggering those actions by evaluating information passed by the pixel (such as the URL, revenue, or other details from the webpage) and taking an action when the information received fits the logic you set up.
You don't need to set up the pixel's rules as soon as you create it. You can create the pixel and add the tag to your website, and then set up the rules later.
Setting Up Universal Pixel Rules
Here are some things to keep in mind as you're setting up your universal pixel:
-
A rule consists of a rule type, an operator, and a value.
-
Rules that include keys must also define a key name.
-
Pixels can pass many key-value pairs at once, so Key/String and Key/Value rules need to know the key name to look for.
-
The key name you set must match the name of a key-value pair defined on the page when the universal pixel fires. See Universal Pixel Script for more information.
-
Key names are case sensitive.
-
-
Universal pixel rules use and/or logic to define when the pixel should update audiences or attribute a conversions.
-
And means that both rules must apply to trigger the pixel.
-
Or means that the pixel will trigger when the condition for either rule is met.
-
-
Each rule set must include at least one audience or conversion, but can include up to 25 audiences and 25 conversions.
-
Universal pixel can include up to 50 rules maximum. These rules can all be part of a single set, or spread out across as many sets as you need to correctly set up the universal pixel.
Each rule set you create for the universal pixel is processed independently. For example, let's say you set up two rule sets: one that applies to all URLs that start with
basis.net
that adds users to Audience A, and one that applies to all URLs that start withbasis.net/connect
that adds users to Audience B. When a user goes tobasis.net/connect
, they will be added to both Audience A and Audience B.
To set up universal pixel rules:
-
Go to Main Menu [
] > Pixels & Audiences.
-
Select a brand. Use search, sort, or filters to find your brand.
-
If you already added a DSP line item to a campaign, you can access pixels and audiences from the media plan by selecting DSP Actions > Pixels & Audiences from the line item.
-
-
Select the Universal Pixels tab from the Pixels & Audiences page.
-
Click the name of the universal pixel you want to define rules for.
-
Click Create rule set. You can create multiple rule sets for a single pixel.
-
Click Add rule to define a rule for the set. If you don't add a rule, the pixel will track all activity on the webpage it's placed on. You can add up to 50 rules to a single pixel, across multiple rule sets.
-
Select the Rule Type:
-
URL: Compares the URL to a value.
-
Key/String: Looks for a string of characters in a particular variable. To use this rule type, you must set up your web pages to send key-value pairs when the universal pixel fires. See Universal Pixel Script.
-
Key/Number: Compares a variable to a number value. To use this rule type, you must set up your web pages to send key-value pairs when the universal pixel fires. See Universal Pixel Script.
-
Revenue/Number: Compares the dynamic revenue to a number value.
-
-
Select an Operator. Refer to the Operators tables below for more information.
-
Enter a Value for the rule. See Values below for more information.
-
For Key/String and Key/Number rules, you must also define the key name.
Key names are case sensitive.
-
-
To group rules together, select the rules you want to combine, then click Group. Grouping rules allows you to apply more complex logic to the rule set.
-
Define the And/Or relationships between your rules and groups of rules.
- AND: The conditions for both rules must be met. If only one condition is met, the pixel won't trigger.
- OR: The conditions for either one of the rules must be met to trigger the pixel.
-
-
From the Audience menu, select the audiences (up to 25 maximum) that you want the rule set to add users to or remove users from.
-
If you cannot find the audience that you need, create a new first-party audience by entering a name for the audience in the box at the bottom of the list, then clicking Add new.
-
Select whether the rule set should Add or Remove users from the selected audiences.
-
-
From the Conversions menu, select the conversions (up to 25 maximum) that you want the pixel to add to.
-
If you can't find the conversion that you need, create a new conversion by entering a name for the conversion in the box at the bottom of the list, then clicking Add new.
Adding to a conversion doesn’t mean the DSP counts a conversion every time a user fires the pixel. When the pixel fires, this triggers conversion attribution: the conversion will be counted if there is an impression or click to attribute it to. If there is no record of an impression or click from one of your campaigns (within the lookback window you chose), no conversion will be counted.
-
-
After you define a rule set, click Duplicate to create a copy of it within this universal pixel. Click Delete to remove it.
-
Click Save.
Rule Types
Rule Type | Description |
---|---|
URL |
Compares the URL to a value. |
Key/String |
Looks for a string of characters in a particular variable. To use this rule type, you must set up your webpages to send key-value pairs when the universal pixel fires. See Universal Pixel Script. |
Key/Number |
Compares a variable to a number value. To use this rule type, you must set up your webpages to send key-value pairs when the universal pixel fires. See Universal Pixel Script. |
Revenue/Number |
Compares the dynamic revenue to a number value. |
Operators
URLs and Key/Strings
Operator | Description |
---|---|
Exactly matches |
Applies every time the URL, string, or user agent exactly matches all the text you enter. |
Doesn't match |
Applies unless the URL, string, or user agent exactly matches all the text you enter. |
Contains |
Applies if the value you enter matches part of the URL, string, or user agent. See Passing Lists of Values with a Universal Pixel for an example that uses this operator. |
Doesn't contain |
Applies unless the value you enter matches within the URL, string, or user agent. |
Starts with |
Applies if the first characters in the URL, string, or user agent match the value you enter. |
Doesn't start with |
Applies unless the first characters in the URL, string, or user agent match the value you enter. |
Matches pattern |
Applies if the URL, string, or user agent exactly matches all the text you enter, using * as a wildcard character. The wildcard character stands in for any character, any set of characters, or no character. For example, if you enter
You can use multiple wildcard characters in a single string. For example, |
Doesn't match pattern |
Applies unless the URL, string, or user agent exactly matches all the text you enter, using * as a wildcard character. |
Key/Numbers and Revenue/Numbers
Equal to | |
---|---|
Equal to |
Applies if the number exactly matches the value you enter. |
Not equal to |
Applies unless the number exactly matches the value you enter. |
Is greater than |
Applies if the number is larger than the value you enter. |
Is less than |
Applies if the number is smaller than the value you enter. |
Is greater than or equal to |
Applies if the number is larger than or the same as the value you enter. |
Is less than or equal to |
Applies if the number is smaller than or the same as the value you enter. |
Values
Values are the characters or numbers that the operators look for or compare another value to.
URL and string matches are case insensitive. If you set the string to "Shoes", this will match any of these:
- shoes
- Shoes
- ShOeS
Values for URL matching rules MUST omit these:
- protocol (http or https)
- ://
- www.
If you want to match pages on https://mycoolsite.com, just enter mycoolsite.com
as the URL.
The webpage must pass a single string or number for each value. Key-value pairs cannot accept arrays. For an example that shows how to work with a list of values, like SKUs from a user's order, see Passing Lists of Values with a Universal Pixel.