With targeting by behavior (or “Retargeting campaigns”), you can mark up the audience you'll later show ads to.
The audience is marked up by creating action tracking points and assigning them temporary categories. Action tracking points are links to a pixel that should be called (by installing them on a site or in a banner) to mark up the audience.
Next, you set up the conditions for campaign impressions in the ad campaign for an audience, whether it's marked up for certain categories or not.
Step 1. Set up categories and action tracking points
Make sure that an advertiser has already been created in your account for a campaign with targeting by behavior, otherwise create an advertiser.
Open the Users → Participants → Advertisers tab. Click the Action tracking points button next to the advertiser's name.
Click + Add and enter parameters for the action tracking point:
ID: Assigned automatically.
Name: Enter a name for the action tracking point.
Category: Select a temporary category you want to mark up users with.
Template type: standard or POSIX.2. If you want to register the address of the page where the action tracking point is placed, choose how the template for checking the page address will be saved.
More details about template types
Referer template: Leave the field blank to register the action tracking point on any page. You can set a specific page template. If the action tracking point is on a page that doesn't match it, the tracking point won't fire.
Size: Indicates the page value for the advertiser. For example, the weight of the home page may be 1, while the weight of the "thank you for your purchase" page may be 10. The weight of the action point can be assigned arbitrarily, but it must be greater than or equal to 1. The recommended range of values is from 1 to 10. You don't need to set the weight for targeting by behavior.
Click Add.
Get the ad tag or a link to the action tracking point.
In the row for the action tracking point on the Action tracking points tab, click Ad tag. If you want to embed the action tracking point for the entire site, copy Yan loader code and Ad tag for the action point. To embed the action tracking point in the banner, copy only the link to it.
Step 2. Create an ad campaign and banners
Create an ad campaign, specify the placement of the campaign on the site where the behavior-targeted banner should be shown. We recommend creating an ad campaign with the same advertiser that you enabled action tracking points for.
Create a banner that needs to be targeted by behavior.
Step 3. Set up targeting by behavior
Go to the Targeting → Add a targeting condition → By behavior → Permanent categories or Temprorary categories tab.
Specify the logic of applying the conditions:
OR: The ad will be served if at least one specified condition is met.
AND: The ad will be served only if all the specified conditions are met.
Set up to 9 targeting conditions. They can be affirmative (Visited the category pages) or negative (Haven't visited the category pages).
Specify the category. For an affirmative condition, you can specify additional conditions (the minimum number and duration of views in the category) for marked up users.
After making changes, click Apply and save the targeting criteria.
Use cases
Serve a banner (or ad campaign banners) only to users who visited the site
Go to the Targeting → Temprorary categories tab and set Combining conditions by → AND.
Set Condition 1 → Visited the category pages and select the created temporary category.
Serve Banner 1 to users who visit the site (section, page) for the first time and serve Banner 2 to users who have already visited the site
For Banner 1 (for users who visit the site for the first time):
Go to the Targeting → Temprorary categories tab and set Combining conditions by → AND.
Set Condition 1 → Haven't visited the category pages and select the created temporary category.
For Banner 2 (for users who visited the site), set the reverse condition:
Go to the Targeting → Temprorary categories tab and set Combining conditions by → AND.
Set Condition 1 → Visited the category pages and select the created temporary category.
Serve a banner from Campaign 2 only to users who saw the banner from Campaign 1
Make sure that there are two or more banners. Banners can belong to different ad campaigns.
Convert a link to the action tracking point. For example, you previously received a link in the format:
Open Banner 1, which should be served first. In the banner settings, enter the link of the action tracking point into the Tracking pixel link field.
Open Banner 2, which should be served only to users who saw Banner 1. Go to the Targeting → Temprorary categories tab at the banner level if both banners are in the same ad campaign. If the banners are in different ad campaigns, open the tab at the campaign level.
Specify Combining conditions by → AND.
Set Condition 1 → Visited the category pages and select the created temporary category.
If there are two action tracking points, serve the banner to users who saw the first point and stop serving it to those who saw the second one
Create two categories:
Category 1: With an action tracking point to show the banner.
Category 2: With an action tracking point to stop showing the banner.
Then set up targeting by behavior:
Go to the Targeting → Temprorary categories tab and choose the logic of interpreting the AND condition.
Set Condition 1 → Visited the category pages and select Category 1.
Set Condition 2 → Haven't visited the category pages and select Category 2.
Click Change.
Alert
If the user fulfills the condition to stop serving the banner and then sees the action tracking point with the Haven't visited the category pages condition again, the information is erased and the banner is served to this user again.
Serve Banner 2 to users who clicked Banner 1
Get a link to the action tracking point that the temporary category is associated with.
Create Banner 1. We recommend using templates with HTML5 in their names.
Open the parameters of the created banner and update them as follows:
There is an “a” tag in the code
Add an onclick="buttonClick() function call to the HTML code.
Where LINK_TP is replaced with an action tracking point link in the format: https://yandex.ru/ads/adfox/392990/tracePoint?p7=wtvn&p8=b.
There is a callClick() function call in the code
Find the callClick function in the banner's HTML code and add code with an action tracking point call to it.
For example:
functioncallClick(n) {
var img = newImage();
img.src = 'LINK_TP&pr=%system.random%';
var link = ( n ? flashVars.events[n] : flashVars.link );
window.open(flashVars.reference + "@" + flashVars.link, flashVars.target);
}
Where LINK_TP is an action tracking point link in the format: https://yandex.ru/ads/adfox/392990/tracePoint?p7=wtvn&p8=b.
Create Banner 2, which should be served only to those who clicked Banner 1, and set up targeting by behavior only for users who visited the pages in the temporary category.