Transferring offline conversions from BotHelp bots to Yandex Metrica helps improve advertising efficiency and increase return on investment thanks to precise optimization in Yandex Direct.
Setting up a mechanism for manual and automatic transfer of offline conversion to Yandex Metrica
1. Creating a Yandex Metrica counter
1. Log in to your Yandex Metrica account and click the "Add counter" button.
2. Enter the counter name, enter the address of any website and accept the terms of the user agreement.
You can add other settings as desired.
3. Click on the "Create counter" button.
4. In the second step, click the "Start using" button.
For further setup you will need the counter number. It can be found in the list of available counters.
2. Enabling the offline conversion download function in Yandex Metrica
1. In the required counter, in the side menu, click the “Settings” button.
2. Select the "Download data" option.
3. Find “Offline conversions” among the settings and click on the “Enable offline conversions” button.
Offline conversions will be available for download within 24 hours.
If you see the "Download offline conversions" button instead of the "Enable offline conversion tracking" button, this means that the feature is already activated.
3. Activation of Yandex Client ID collection in the subscriber card via mini-landing
1. In the "Growth Tools" section, add a new mini-landing page.
2. Add at least one button to the mini-landing page (Yandex Client ID collection is available for the “Facebook”, “Telegram”, “Viber”, “Whatsapp” buttons).
3. Activate the setting “Track subscription via analytics”.
4. In the Yandex.Metrics field, enter the number of the counter created earlier.
5. Fill in the remaining required settings for the mini-landing page and save it.
After saving the mini-landing page, the collection of Yandex Client ID for visitors to the landing page is activated. In the card of each subscriber who clicked on the button on this mini-landing page, a system field Yandex Client ID with a filled-in value will appear.
4. Creating a goal in Yandex.Metrica
1. Go to the counter in Yandex Metrica. Open the "Goals" tab.
2. Click on the "Add Goal" button.
3. In the window that opens, enter the name of the goal, in the “Goal ID” field, select “matches” and enter an arbitrary value (for example, “order_confirmed”).
4. Click "Add target". Next, we will need the target ID value for the settings.
Automatic transfer of offline conversion to Yandex Metrica
Automatic transfer is available through the action "Send event to Yandex Metrica" via the bot designer.
The function is available for Telegram, Facebook, Viber, Whatsapp bots.
For the conversion transfer function to work correctly, you need to prepare a counter and a goal in Yandex Metrica, a Yandex authorization token.
1. Obtaining an authorization token by registering a Yandex application
To work with the API from a browser, you need to use an authorization token. To get a token:
1. Create an application , fill in the fields:
— Name (can be specified arbitrarily).
— Service icon (optional).
— Application platforms (select web services).
— In the “redirect URI” field, enter https://oauth.yandex.ru/verification_code
.
— In the “Data access” section, specify metrika:read
and metrika:write
.
— In the “Contact email ” , enter your email to receive notifications about changes in Yandex external authorization.
— Click “Create Application”.
2. On the page that opens, copy the value of the ClientID field.
3. Add the copied ClientID to the link like https://oauth.yandex.ru/authorize?response_type=token&client_id=<application ID>
4. Follow the link and copy your authorization token on the page that opens. Save the token in notes, you will need it to set up automatic transfer of offline conversions.
Important! The token lifetime is 1 year. After a year, you will need to follow the same link again and save a new authorization token for a year. If you connect other services to the application or add settings, this can significantly reduce the life of the authorization token (even up to 7 days).
2. Setting up automatic offline conversion transfer
1. In the bot designer (Telegram, Facebook, Viber, Whatsapp), add a new step of the “Action” type or open an existing one in editing format.
2. Click the "Add action" button and select the "Send event data to Yandex.Metrica" action.
3. Fill in the fields “Counter number” (Yandex.Metrica counter number), “Token” (Yandex application authorization token), “Goal ID” (the goal ID in Yandex.Metrica and in the constructor must match).
How to obtain data for filling can be found in the article above.
4. Save the changes in the step.
The file with conversions will be sent once an hour at XX:08 (for example, at 13:08, 14:08, etc.) to Metrica. Each sent file will contain the conversions collected over the past hour. After the file with conversions has been sent, a corresponding entry with the status "Processing" will appear at the bottom of the "Data upload" page in the "Settings" section of Metrica.
Upon successful download, the status will be updated to “Completed”.
In the Conversions section of Metrica, data on added conversions will appear.
Important! The conversion time in the "Conversions" section will correspond to the time the subscriber visited the mini-landing page.
Manual transfer of offline conversion to Yandex Metrica
Generating a file for uploading offline conversion to Yandex Metrica
In order for Yandex Metrica to process and accept conversions after loading, it is necessary to correctly form a csv file. The file must consist of three mandatory parameters for each transmitted conversion: ClientId (unique user identifier), Target (target identifier in Yandex Metrica), DateTime (time of conversion).
The procedure for generating a csv file:
1. Export the list of subscribers from BotHelp "With all custom fields" and download the file.
2. Open the file and filter the list by the Yandex Client Id column and leave the lines that have any value in this column, delete the rest. Change the column name to ClientId.
3. Add the Target column, for each conversion it is necessary to fill in the goal ID. The goal ID can be found in the "Goals" section in Yandex Metrica.
4. Add the DateTime column, it must be filled in for each conversion. You can use the value of the "Date and Time" type columns from the download or fill it in manually.
As a result, you should get a similar table .
5. Upload the file to Yandex.Metrica in the section “Settings” — “Data upload” — “Offline conversions”.
If you have not found the answer to your question, ask us in the chat inside your account or write to BotHelpSupportBot or to hello@bothelp.io
Get 14 days of full functionality of the platform for creating mailings, autofunnels and chatbots BotHelp.