Dynamic remarketing based on web events

Events from the site
Using special Top.Mail.Ru counter JavaScript code integrated into the pages of the site, information about events is transmitted to myTarget. To analyze user behavior on the site, several basic entities and parameters are used to mark pages on the site:

  • viewProduct - visiting the product page, the product ID and cost is transmitted;
  • addToCart - visiting the cart page or adding an item to the cart (the page with the list of products selected by the user), product IDs and their total cost are transmitted;
  • purchase - visiting the purchase confirmation page (on the fact of purchase), product IDs and their total cost are transmitted.
Adding Top.Mail.ru counter goals
For dynamic remarketing based on web events you need to configure the Top.Mail.ru counter goals. To do this:
  1. Open the "Audiences" tab → "Counters Top@Mail.Ru".
  2. Select the desired counter and in the "Goals" column click "Add".
  3. In the window that appears, click "Add goal" → "JavaScript Event".
  4. Next, configure one of the required events as described below.
Product page (event/action: view information about a specific product).
  1. In the "Goal category" field, select "View content" from the drop-down list.
  2. Enter the name of the event ("Goal name" field) and its value (the "Value" field).
  3. In the "Event from JavaScript" field, enter viewProduct.
  4. Click "Save goal".
After adding a goal, click the "Copy Code" link and save the code. To pass the goal to myTarget, the site must execute the JavaScript code:

_tmr.push({ type: "reachGoal", id: PIXEL_ID, value: "VALUE", goal: "viewProduct", params: { product_id: "PRODUCT_ID"}});
Cart (event/action: view cart page, add an item to cart).
  1. In the "Goal category" field, select "Add to basket" from the drop-down list.
  2. Enter the name of the event ("Goal name" field) and its value (the "Value" field).
  3. In the "Event from JavaScript" field, enter addToCart.
  4. Click "Save goal".
After adding a goal, click the "Copy Code" link and save the code. To pass the goal to myTarget, the site must execute the JavaScript code:

_tmr.push({ type: "reachGoal", id: PIXEL_ID, value: "VALUE", goal: "addToCart", params: { product_id: "PRODUCT_ID"}});
Purchase page (event/action: purchase completion).
  1. In the "Goal category" field, select "Purchase" from the drop-down list.
  2. Enter the name of the event ("Goal name" field) and its value (the "Value" field).
  3. In the "Event from JavaScript" field, enter purchase.
  4. Click "Save goal".
After adding a goal, click the "Copy Code" link and save the code. To pass the goal to myTarget, the site must execute the JavaScript code:

_tmr.push({ type: "reachGoal", id: PIXEL_ID, value: "VALUE", goal: "purchase", params: { product_id: "PRODUCT_ID"}});
It is also necessary to dynamically substitute in the parameters:

  • VALUE - the cost of the product,
  • PRODUCT_ID - product identifier as it appears in your feed.
When passing event to the pixel, we recommend to pass the cost of the product in the value parameter. This will allow us to make targeting and optimization more accurate, as well as give you the ability to track Revenue, ACS, and ROMI metrics.
Was this article helpful?
Yes
No