Targeting by behavior (or Retargeting campaigns) involves serving ads to a previously marked up audience. For example, you can display a banner only to those users who've already visited the site.
How it works
You create temporary or permanent categories.
If you select temporary categories, action points are added for the targeting. Action points are code snippets or pixel links used to mark up the audience. You can embed them in the entire site or its individual elements, such as banners. Learn more about action points.
If you select permanent categories (used less frequently), they are assigned to sites, placements, or sections without action points being added.
You set up the campaign's targeting criteria for an audience, whether it's marked up for certain categories or not.
Step 1. Create categories
Open Settings → Categories and go to the desired tab, depending on the category type:
To mark up the audience using action points, select Temporary.
To mark up the entire audience of the site, placement, or section select Permanent.
Click + Add.
Enter a name for the category and set its activity period, then click Add. Your category is ready.
Step 2. Add action points with temporary categories or assign permanent categories to sites
Action points
Assigning categories to sites
Make sure that an advertiser has already been created in your account for a campaign with targeting by behavior, otherwise create a new one.
Open the Users → Participants → Advertisers tab. Click the Action tracking points button next to the advertiser's name.
Click + Add.
Configure the action points:
ID: This is the unique ID of the action point. The ID is assigned automatically. We don't recommend changing it.
Name: Required parameter. For example, it may correspond to the section name on pages where the action point will be set.
Category: Specify a temporary category you want to mark up users with.
Template type: Select standard or POSIX.2. If you want to register the address of the page where the action point is placed, choose how to save the template for checking the page address. Learn more about template types.
Referer template: Sets the position of the action point on the site. Set a specific page template to embed the point only in those pages. Leave the field blank to register the action point on any page.
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.
Click Add.
Go to the Action tracking points tab and click Ad tag in the row with the desired action point. Copy the code snippet or link:
If you want to embed the action point for the entire site, copy Yan loader code and Ad tag for the action point.
To embed the action point in a banner, copy only the action point link.
Go to the Sites section in the main menu, then select an existing site or add a new one.
Click the Settings icon next to the site name.
Select a permanent category from the dropdown list. To assign a category to a section or placement, select the desired category under its settings in the Sections tab.
Tip
If you set a category for the entire site, you don't need to select it for individual sections and placements: they will inherit it from the site.
Step 3. Create an ad campaign and banners
Create an ad campaign and 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 points for.
Create a banner to target by behavior.
Step 4. Set up targeting by behavior
Open the Campaigns tab. Next to the campaign name, click → Targeting or select a campaign and go to Targeting.
Click Add a targeting condition and select By behavior.
At the top, select the type of categories you want to target: temporary or permanent.
Set up the logic for applying the conditions:
Combining conditions by Or: The ad will be served if at least one specified condition is met.
Combining conditions by And: The ad will be served only if all the 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).
Select a 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
Under The targeting parameter, click Edit next to By behavior or select Add a targeting condition → By behavior if no condition is set.
Go to the Temprorary categories tab and select 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):
Under The targeting parameter, click Edit next to By behavior or select Add a targeting condition → By behavior if no condition is set.
Go to the Temprorary categories tab and select 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:
Under The targeting parameter, click Edit next to By behavior or select Add a targeting condition → By behavior if no condition is set.
Go to the Temprorary categories tab and select 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 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 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 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.
Under The targeting parameter, click Edit next to By behavior or select Add a targeting condition → By behavior if no condition is set.
Go to the Temprorary categories tab and select Combining conditions by And.
Set Condition 1 → Visited the category pages and select the created temporary category.
If there are two action 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 point to show the banner.
Category 2: With an action point to stop showing the banner.
Then set up targeting by behavior:
Under The targeting parameter, click Edit next to By behavior or select Add a targeting condition → By behavior if no condition is set.
Go to the Temprorary categories tab and select Combining conditions by And.
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 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 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 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 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 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.