Creating and setting up Yandex.Metrica



When creating a flow
Add an offer and fill in the basic flow data, then press the "Apply" button to let the system create flow domain. You'll need it later:
Go to Yandex.Metrica website and press the "Add tag" button.
Fill in the data:

"Counter" - give it any name you want, the main point is that it should be clear which flow's statistics it displays.

"Website address" - this is when we need the domain from the flow, that we created. Use only the main part.
Skip "Accept data only from the specified addresses" without doing anything.

Select your time zone.

Enable Webvisor for detailed analytics.
Now, you have to accept User agreement and press the "Create tag" button.
If you need to track raw leads, you can create a goal for doing this. It's also worth noting that all leads are displayed in the affiliate network's statistics, that's why you can skip this step and do the next one – adding a counter to the landing page itself.

Select "configure goals".
Press "Add goal" button.
Specify the goal name, for example: "Leads", select the condition type: "JavaScript-event", specify goal identifier - "ORDER". Now, you only have to press the "Add goal" button, and the setup is finished.
Now, add counter ID in the flow settings. Go to "Settings" section, "Counter" tab and copy the number.
Then, go back to your flow and add the ID which you have just copied to "Yandex.Metrica (ID)".
Everything is ready now. Don't forget to save a flow.
IMPORTANT: Entering counters in offer flows with redirect landings is limited: if the advertiser supports pixel transfer, then the field for entering the pixel will be active. Also pay attention to the description in the offer card, where the nuances of how pixels work may be indicated.
When downloading a landing page to the hosting service
Add an offer to have an opportunity to download a landing page to your hosting service and press the button:
Download an archive to your hosting service and unpack it.

Then, go to Yandex.Metrica and press the "Add tag" button.
Fill in the following data:

"Counter name" – give it any name, but it must be clear what website the statistics are about.

"Website address" – add a domain that will be used to work with an offer.

Skip this step and don't do anything: "Accept data only from specified addresses".

Select your time zone.

Enable Webvisor for detailed analytics.
Now, you have to accept User agreement and press the "Create a counter" button.
If you need to track raw leads, you can create a goal for doing this. It's also worth noting that all leads are displayed in the affiliate network's statistics, that's why you can skip this step and do the next one – adding a counter to the landing page itself.

Select "configure goals".
Press "Add goal" button.
Specify the goal name, for example: "Leads", select the condition type: "JavaScript-event", specify goal identifier - "ORDER". Now, you only have to press the "Add a goal" button, and the setup is finished.
Now, add counter ID in the landing page. Go to "Settings" section, "Counter" tab and copy the code by pressing the "Copy code" button.
Now, you only have to add your counter to the files of the landing page added to the hosting service: index.php and invoice2/index.php before the </head> closing tag, or in files trackers.php and trackers_order.php.

To add goal code to track conversions, go to Yandex.Metrica to "Settings" section, "Goals" tab, open editing the goal you have already created, copy the code by pressing the "Copy code" button.
Now, go back to the hosting service, add the following code to the code of the counter that we added to invoice2/index.php or to trackers_order.php. It should added after the code:
ym(69170986, "init", { clickmap:true, trackLinks:true, accurateTrackBounce:true, webvisor:true });

then add ";"

Please note that you specify this Goal only on the landing page, and this goal is not needed on the pre-landing page, since there is no form for submitting an application on the pre-landing page. You need to insert only the main code of the counter into the trackers.php or index.php file without a Goal to analyze pre-landing visits.

After this, when an order is placed on a landing page, Yandex.Metrica will show leads.
Dynamic counter
The downloaded landing page has a Dynamic counter. It's already available, you do not need to insert codes into the landing page.
At the end of the URL, insert ?ya_pixel= (after the domain) or &ya_pixel= (after other macros), and after the = sign, insert the counter ID.