Data source: Top.Mail.Ru

You can display ads to only people who have visited your site. For example, select an audience that added items to your shopping cart but didn't make a purchase and show ads to those people.

To use Top.Mail.Ru as a data source for advertising campaigns:
  1. Connect counter Top.Mail.Ru. If using counter Top.Mail.Ru for dynamic retargeting, specify events in the code
  2. Set goals for the counter
  3. Add a source to the segment
Step 1. Connect the counter Top.Mail.Ru

How to connect an existing counter Top.Mail.Ru

If you already have a counter Top.Mail.Ru,

  • enter the email address of the counter owner in the "Counter owner" field and the counter number in the "counter ID" field;
  • click "Send a request to bind".
Request to add a counter
You can send a request to add a counter from an advertiser's account only.

The e-mail, which is connected to the counter, will receive a letter with a validation link. Follow the link from the email and the counter will be linked to your myTarget account.

How to create a new counter Top.Mail.Ru

Create a counter Top.Mail.Ru. Fot this click the "Audiences" tab → "Counters Top.Mail.Ru" and click "Create counter".

Specify the data to create the counter:

  • The name of the counter — it will appear in the interface of the Rating Mail.ru and myTarget;

  • Resource address — the address and protocol of the site where the counter will be installed;

  • Your E-mail — a confirmation link will be sent to this e-mail address;

  • Password — needed to access the counter in Top.Mail.Ru and must contain more than 6 characters.

Enable the option "Use code for synchronization" below the counter to collect information about the visitors of your website. This data can be used as a data source.
Data to create a counter
After the counter is created will appear its code. Install it on all pages of your site inside the <BODY> block as soon as possible to its beginning.
Counter code sample
On the e-mail will be sent a letter confirming the addition of the counter to your account. Click the link in the email to complete adding the counter.

All counters are displayed on the "Audiences" tab → "Counters Top.Mail.Ru". You can copy the counter code at any time by clicking on the "Code" link next to the counter name.

After the counter has accumulated statistics (the status of the counter is "Running"), it can be used as a data source. If the counter does not receive data, check that the counter is installed correctly on the site, or contact the counter owner.
Setting up a counter for dynamic remarketing
If you're going to use a counter for dynamic remarketing, write down the events you want to pass to myTarget in your code.

If the counter code is already set, add a special code for dynamic remarketing to it:
<!-- Rating@Mail.ru counter dynamic remarketing appendix -->
   <script type="text/javascript">
  	var _tmr = _tmr || [];
  	_tmr.push({
     	type: 'itemView',
     	productid: 'VALUE',
     	pagetype: 'VALUE',
     	list: 'VALUE',
     	totalvalue: 'VALUE'
   	});
   </script>
<!-- // Rating@Mail.ru counter dynamic remarketing appendix -->
Add required events to the code (primary data source):

  • product – product page visit;
  • cart – add products to the cart or visit the cart page;
  • purchase – visit the purchase confirmation page (the fact of purchase).

Optional events:

  • home – visiting the advertiser's home page;
  • category – visit the page with a list of products of a certain category;
  • searchresults – visit product search results page;
  • other – visiting any other page of the site.

We recommend placing counter and dynamic remarketing codes after the opening tag <body>.

Be sure to place the counter code (framed by tag <!-- Rating@Mail.ru counter --> ) before dynrem code (framed by tag <!-- Rating@Mail.ru counter dynamic remarketing appendix -->).

Example of placing counter codes and dynamic remarketing:
<html>
   <body>
      <!-- Rating@Mail.ru counter -->
     	<script type="text/javascript">
        	var _tmr = window._tmr || (window._tmr = []);
        	_tmr.push({id: "Counter ID", type: "pageView", start: (new Date()).getTime(), pid: "USER_ID"});
        	(function (d, w, id) {
           	if (d.getElementById(id)) return;
           	var ts = d.createElement("script"); ts.type = "text/javascript"; ts.async = true; ts.id = id;
           	ts.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//top-fwz1.mail.ru/js/code.js";
           	var f = function () {var s = d.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ts, s);};
           	if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); }
        	})(document, window, "topmailru-code");
     	</script>
   	  <noscript><div>
        	<img src="//top-fwz1.mail.ru/counter?id=Counter ID;js=na" style="border:0;position:absolute;left:-9999px;" alt="" />
     	</div></noscript>
      <!-- //Rating@Mail.ru counter -->
      <!-- Rating@Mail.ru counter dynamic remarketing appendix -->
     	<script type="text/javascript">
        	var _tmr = _tmr || [];
        	_tmr.push({
           	type: 'itemView',
           	productid: 'VALUE',
           	pagetype: 'VALUE',
           	list: 'VALUE',
           	totalvalue: 'VALUE'
        	});
     	</script>
      <!-- // Rating@Mail.ru counter dynamic remarketing appendix -->
   </body>
</html>
In the counter code, instead of the "Counter ID", should be specified the counter identifier that you selected when loading the feed.

In the dynamic remarketing code, instead of "VALUE" for the parameters "productid", "pagetype", "list" and "totalvalue" certain values should be specified. They can be set automatically, for example, with the help of a certain tool that generates the code for the pages of your site.

Description of dynamic remarketing options

productid (required)
Used to specify the identifier of the product (products) concerned by the event. For example, the product identifier to which the site page displayed to the user is dedicated.

The parameter value must necessarily correspond to the product identifier from the feed (element "offer", property "id"). It is for this identifier that the system understands what products the user is interested in, so that based on them, select products from the feed to be displayed in advertisements.

Example: productid: '123456'

If there are several products on the page, for example, on the cart page (pagetype: 'cart') or the purchase confirmation page (pagetype: 'purchase'), then their identifiers should be listed in the array (in square brackets separated by commas).

Example: productid: ['123', '456']
pagetype
(required)
Used to specify the type of page or section of the site, or the event / action performed by the user on your site.

Values that must be sent (without these data, dynamic remarketing is impossible):

  • product – view product page or view information about a specific product;

  • cart – viewing the cart page, or adding a user to the cart without visiting its page;

  • purchase – view the purchase confirmation page (product purchase event / action).

Optional:

  • home – view home page;

  • searchresults – view a page with site search results;

  • category – view product category page;

  • other – view any other page (or any other action) that is not suitable for other values.

Example: pagetype: 'product'
totalvalue
Used to indicate the total cost of products. The parameter must contain the sum of the prices of all products specified in the parameter productid — for example, the sum of the prices of all products from the cart. If only one product is involved, then its current price. It makes sense to pass this parameter to the pagetype with the values product, cart and purchase.

Example: totalvalue: '499.99'
list
(required)
Used to specify the ID of the feed to which the products specified in the productid parameter belong. The ID is assigned to the feed when it is loaded (Audiences → Product feeds).

Example: list: '1'

If within one site you use several feed files, for example, different feeds to different cities, then they should be associated with one Top.Mail.Ru counter, but have different IDs. For example, you uploaded a feed for Moscow and assigned it an ID of 1, as well as a feed for Vladivostok, and assigned it an ID of 2. Therefore, when a product is shown to a visitor from Moscow, ID 1 must be specified in the list parameter, and ID 2 must be specified to a visitor from Vladivostok.

Examples of using dynamic remarketing code (for a site with one feed)

Product page (event / action: view information about a specific product).

Use the dynamic remarketing code with the indication pagetype: 'product', when displaying the product to the user he was interested in (specifically looked at information about a particular product).

If your site allows you to view information about different products without reloading the page, then you can dynamically update information about the product that the visitor is interested in - consistently make calls to the dynamic remarketing code with the corresponding values of the parameters productid and totalvalue.
<script type="text/javascript">
   var _tmr = _tmr || [];
   _tmr.push({
      type: 'itemView',
  	productid: '12345',
  	pagetype: 'product', 
  	totalvalue: '1000.89',
  	list: '1'
   });
</script>
Cart (event / action: view cart page, add item to cart).

Use the dynamic remarketing code with the indicatior pagetype: 'cart', if user navigates to the cart page and it is not empty, or the user has added some products to the cart without switching to it (without opening the cart page itself). Make calls to the dynamic remarketing code with the ID of all products currently in the cart.
<script type="text/javascript">
   var _tmr = _tmr || [];
  	_tmr.push({
      type: 'itemView',
  	productid: ['1234','5678','9012'],
  	pagetype: 'cart', 
  	totalvalue: '15000.45',
  	list: '1'
    });
</script>
Purchase page (event / action: fulfillment of purchase).

Use the dynamic remarketing code with the following pagetype: 'purchase', if user has completed the order. Make calls to the dynamic remarketing code with the ID of all products purchased by the user.
<script type="text/javascript">
   var _tmr = _tmr || [];
  	_tmr.push({
      type: 'itemView',
  	productid: ['1234','5678','9012'],
  	pagetype: 'purchase', 
  	totalvalue: '15000.45',
  	list: '1'
   });
</script>

Enable dynamic remarketing code through Google Tag Manager

Container creation

After creating an account in Google Tag Manager, you need to create a container. The container contains all the tags for a particular website. Therefore, you must give the container an appropriate name. For example, the container for myperfectsite.com can be called "myperfectsite.com".

To create a new container:
1. On the main page Google Tag Manager in the list of accounts, select the account you want and click on the "..." button. Then click on Create Container.
2. Enter the name of the container, select the "Website" option in the "Target Platform" section and click the "Create" button.
3. If the container is created together with the account, then on the main page click the "Create an account" button and on the next page add an account and create a container.

Container placement

After creating the container, a modal window containing the container JS code will appear. This code must be placed on each page of the site. How to place it correctly will be indicated in the modal window.

Adding Tags and Triggers

The steps to add a new GTM tag are:
1. On the main page, on the "Overview" tab, click on the "Add a new tag" button.
2. On the next page, enter the correct tag name and click anywhere in the area of the "Tag Configuration" page.
3. Then select the Custom HTML tag type.
4. In the next window, add the JS code of the TOP@mail.Ru counter and the JS code for dynamic remarketing.
5. In the advanced settings of the tag, in the "Activation settings" section of the tag, select "No restrictions".
Please note!
In the dynamic remarketing code, instead of "VALUE", the parameters "productid", "pagetype", "list" and "totalvalue" must be set to specific values. They can be set automatically, for example, using a tool that generates the code for the pages of your site.
In order for the previously created tag to work, you need to create a trigger, activation of which will trigger the dynamic remarketing JS code, which we added in the previous steps when adding a new tag.

To do this, you must sequentially perform the following steps:
1. Click anywhere in the "Triggers" area;
2. Add a new trigger by clicking on the plus sign:
3. Enter a meaningful name for the trigger and select the type of trigger "Window loaded".
Next, you need to determine when any or what events need to activate this trigger.

For example, we want this trigger to be activated when visiting the basket on the site.

To do this, you must:
  1. Click anywhere in the "Trigger Settings" area;
  2. In the group of checkboxes "Trigger activation conditions" select "Some events "Window loaded"";
  3. In the very first drop-down list on the left, select "Page URL", then "Contains" and, for example, /cart;
  4. Save changes by clicking on the "Save" button.
In this particular case, /cart as part of the URL is selected as an example only.

Publish changes

After you add the GTM tags and their corresponding triggers, you need to post your changes. To do this, on the "Workspace" tab of Google Tag Manager, click on the "Submit" button.
On the next page you need to enter the name of the published version and a brief description of the changes. Then click on the "Publish" button.

Features call code dynamic remarketing

Depending on the user's actions on the site, the dynamic remarketing code can be called an unlimited number of times without reloading the page, but all calls should be made only after calling the main counter code Top.Mail.Ru.

When calling the code in the global scope, to declare the _tmr object, it is enough to specify its name, for example:
<input type="button" id="addToCart" value="Add to cart">
<script type="text/javascript">
   jQuery('#addToCart').on('click', function() {
      var _tmr = _tmr || [];
  	_tmr.push({
     	type: 'itemView',
     	productid: '1234',
     	pagetype: 'cart',
     	list: '1'
  	});
  	return true;
   });
</script>
If the code is called inside some JS-function or elsewhere, then you may need to declare the _tmr object as a method of the global window object, for example:
<input type="button" onclick="var _tmr = window._tmr || (window._tmr = []); _tmr.push({ type:'itemView', productid:'1234', pagetype:'cart', list:'1' }); return true;" value="Add to cart">
The examples above demonstrate an embodiment of sending data to myTarget about adding a product to the cart when the user clicks the "Add to cart" button.
Step 2. Set goals for the counter
When you set the counter Top.Mail.Ru it will start collecting data about all visits to your website. To refine into information, such as highlighting users who put items in the shopping cart but didn't pay for the order, set up goals.

To create a goal, click the "Audiences" tab → "Counters Top@Mail.Ru". Select the counter and in the "Goals" column click "Add". If you add a counter to which you do not have rights, the goals of the counter will not be shown until the rights are confirmed by the owner.

Click "Add goals" and select the source:
Source
Users
Example
URL-substring
Viewed a specific directory on the site
To highlight those users who are interested in stock on your website (https://www.mysite.com/actions/) in the URL of the page contain the string /actions/.

As a substring may be any part of the URL, for example, you define custom label: value result=ok fit for the pages view https://mysite.com/Rating/?result=ok.
Referrer-substring
Came from a specific site
To highlight users who came to your site from the site https://www.othersite.com, in the Referrer field of the URL page contains a substring, specify othersite.com
JavaScript event
Performed targeted actions on the page (for example, downloaded the file, added the product to the cart, filled out the form).

Used to receive events from JavaScript
To select the users that put in the basket arrows, in the Event field from JavaScript enter "arrows". To send an event named "arrows" from JavaScript when the event occurs, run the following JavaScript code:

_tmr.push({ id: 'counterID', type: 'reachGoal', goal: 'arrows' });

The event name must consist of Latin letters or numbers.
Deep of visit
Watched a certain number of pages
To highlight those who have studied your site and viewed at least 10 pages, enter 10 in the visit Depth field.
Stay time
Spent on the site a certain time (in seconds)
To highlight those who quickly left the site, in the time spent on the site field, enter, for example, a value of 5. The value must be at least 2 seconds.
Specify the name of the goal. You can also specify the numerical value of the goal: it is necessary to calculate the numerical indicator of the goals achieved.

From the moment you set up a goal, data on the achievement of goals will be collected. Information about site visits and the achievement of user goals is kept for 420 days.

Goal values

Each goal can have a Value - a fixed number attached to a specific goal. You need to specify it if you follow the indicators Revenue, ROMI, ACS in statistics.

Indicate the value as an integer: if the amount is in kopecks, round the number.

When reaching a goal with a value, the value will be summed over all the achievements of the goal.

To send a target with the name NAME and a value VALUE from javascript, place the actual counter code (received after May 20, 2013) at the beginning of your page, and when you reach the goal, run the following javascript code:
var _tmr = window._tmr || (window._tmr = []);
_tmr.push({ id: "ID-счетчика", type: "reachGoal", goal: "NAME", value: VALUE });
Examples of setting goals for dynamic remarketing

Goal "Visited cart" (URL: /cart/)

  1. Go to the "Audiences - Top.Mail.Ru Counters" page, click "Add" in the "Goals" column of the counter that you selected when loading the feed;
  2. In the window that opens, click "Create goal", select "Substring from the URL";
  3. Fill the form:
  • Specify in the field "Type of purpose" the value "Initiation of order placement";
  • Specify the name of the goal (for example, "Visited cart");
  • In the field "URL of the page contains a substring" specify the part of the URL of your site relating to the basket (for example, if the basket is located at the URL https://www.example.com/cart/, then specify /cart/ in this field);
  • Click the "Save goal" button. The created target will appear in the list of targets.
Goal "Visited cart"

Goal "Added to cart" (JS: addToCart)

  1. Go to the "Audiences - Top.Mail.Ru Counters" page, click the "Add" button in the "Goals" column of the counter that you selected when loading the feed;
  2. In the opened window, click the "Create goal" button, select "JavaScript event";
  3. Fill the form:
  • Enter the value "Add to basket" in the "Goal category" field;
  • Set the name of the goal (for example, "Added to cart");
  • In the field "Event from JavaScript" enter addToCart;
  • Click the "Save goal" button, the created target will appear in the list of targets.
Goal "Added to cart"
Step 3. Add sources to the audience segment
Click the "Audience" → "List of segments" and click "Create segment".

Click "Add segments": the list contains the segments and data sources you added earlier. You can create new segments based on existing segments.

Select one or more sources and click "Add segment". You can add or exclude from the segment users who have achieved the specified goals, and the time. Then click "Add segment".
Add segment
Was this article helpful?
Да
Нет