📜 ⬆️ ⬇️

Custom targeting - what is it and why is it needed?

What is it?



Custom targeting is an ad serving setting based on some internal website parameters. For example, on the website of classmates. Ru, such parameters can be a school, an institute or a military unit specified in a user profile. on Habré, user targeting could take into account the user's karma, or any data from the summary .

Why do you need it?


')
The main purpose of user targeting, in my opinion, is the ability to create the most personalized advertising messages. Then I will talk about setting up and using custom targeting using the example of the AdFox banner system and our website maindoor.ru .



Two words about the project



Maindoor.ru is a website about foreign real estate. In short, the site consists of several large sections - countries, catalogs and texts (news and articles). Objects in the catalog, news and texts may belong to a particular country. For objects this attribute is obligatory, for texts it is not.

From time to time we have advertisers who want to place different banners on sites from different countries. For example, a hypothetical British Airways wants to see banners on flights to London on the pages of objects from England, and on the pages of American objects - banners on flights to New York.

In addition, our site is bilingual, so there is a natural desire to place English banners on the English version (for the sense of banners in Russian for the English-speaking public is zero).

For Russian and English versions, we use the same templates, and all the inscriptions are in the localization files.

Custom targeting setting



In the AdFox interface, custom targeting parameters are entered, a new call code is generated, in which these parameters are taken into account, and further in the template from which the banner is called, the required values ​​are transferred to the call code.

Let me explain in more detail on the example of language targeting. Go to the interface AdFox, click on the tab "Settings", then click "Custom targeting."

image

We see there something like this:

image

The first two parameters will be empty for you too, but we will fix it now :) press the pencil opposite the topmost parameter, an editing window will open, like this (you will have number 1 instead of number 3):

image

Fill out the form like this:

image

The name is the name of the variable, “Targeting Name” is how you see this targeting when you set up a campaign. What is the "name of the report" I will explain later. Click "Change" and return to the window with variables.

Now, when generating the call code for all your banner types, the code will set the variable puid1, which stores the language identifier. Now we are just these identifiers and we will get ... We press the "Values" button, then the "Add" button. Fill out the form like this:

image

Save the changes, doing the same for the English language. We get something like this:

image

The banner call code will now look something like this:

 <! - AdFox START ->
 <! - maindoor.ru ->
 <! - Site: Maindoor.Ru / News ->
 <! - Category: <not set> ->
 <! - Banner Type: Padding 100% ->
 <script type = "text / javascript">
 <! -
 if (typeof (pr) == 'undefined') {var pr = Math.floor (Math.random () * 1000000);  }
 if (typeof (document.referrer)! = 'undefined') {
   if (typeof (afReferrer) == 'undefined') {
     afReferrer = escape (document.referrer);
   }
 } else {
   afReferrer = ";
 }
 var addate = new Date ();
 document.write ('<scr' + 'ipt type = "text / javascript" src = "http://ads.adfox.ru/42644/prepareCode?p1=bgye&amp;amp;amp;amp;p2=y&amp;amp ; amp; pucn = a & amp; amp; amp; pfc = a & amp & amp; amp; amp; pfb = a & amp; amp; amp; pr = '+ pr +' & amp; amp & amp; pt = b & amp; amp; pd = '+ addate.getDate () +' & amp & amp; amp; pw = '+ addate.getDay () +' & amp & amp; p & amp; pv = '+ addate.getHours () +' & amp. amp & amp; py = a & amp & amp; amp; prr = '+ afReferrer +' & amp & amp; amp; puid1 = "> <\ / scr '+' ipt> ');
 // ->
 </ script>
 <! - AdFox END ->



Now all that's left is to insert a new code for the call to the page and pass the value of the puid1 variable. With the insertion of the code, I think you can handle without my explanation :) Two words about how you can assign the value of the JS variable puid1.

The language identifier for the material is stored in the database along with the title, the main text and other things. We can transfer it to the template and further modify the call code like this:

  rr = '+ afReferrer +' & puid1 = <? = $ language_id?> " 


When you create a campaign, or edit an existing one, on the Targeting tab, you will have the Targeting by Language tab.

image

Pay attention to the tick "unknown, not set." A check mark indicates that a campaign should be shown if, for some reason, the system cannot determine the language (this happens).

Now I’ll say a few words about the reports. After some time after using the language targeting, in the General Reports traffic statistics will appear on the Russian and English versions of the site. Go to the general reports, select among the reports "Targeting by language":

image

Click "Show" and see the distribution of traffic by language:

image

Here's a sneak that I wanted to talk about custom targeting. I will be happy to talk in the comments :)

Source: https://habr.com/ru/post/81320/


All Articles