Installing Codes on the Website
These codes are used to account general statistics and to analyse visitors' actions on the site.
Installing codes on the site provides additional potential for audit settings and advanced options for optimizing the campaign.
Provided codes do not affect the speed of site loading and do not change the appearance of the pages.
1. Cross-cutting code
Cross-cutting code is necessary for the correct operation of other system codes, as well as for user identification in case of loss of cookies or visiting a site from different devices.
For correct operation of codes on the site it is necessary to install cross-cutting code:
- on all site pages
- before closing
</head>
tag - above other system codes
For correct operation of codes on the site it is necessary to install cross-cutting code:
To identify user in case of cookies loss or a site being visited from different devices it is necessary to transmit data of authorized user using special code parameter – user ID.
How to install a code:
Copy the contents of all_site.txt file and paste into all pages of your site before closing </head>
tag.
Instead of USER_ID, your CMS system should transmit client's email address (which is truncated and converted to lower case). Before saving it on our servers, the system hashes it using the MD5 algorithm. Encrypted email addresses are anonymous and cannot be decrypted, so the system does not access your users' email addresses.
Alternatively, you can send an encrypted email address using the MD5 hash function. Before encrypting using the MD5 hash function, the email address must be truncated and converted to lower case. Subsequently you can transfer the encrypted string to the USER_ID parameter.
Example of hashed user@example.com email address:
USER_ID parameter: 'b58996c504c5638798eb6b511e6f49af'
All other codes should be placed on the site page after the cross-cutting code.
Code example (file title is “all_site”):
PLEASE NOTE! - The code provided here is an example. Valid codes in accordance with the data of your site in the system will be sent additionally.
<!-- RTB Counter --> <script> (function (w, d, n, u, s) { w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)}; var a=d.createElement(s),m=d.getElementsByTagName(s)[0]; a.async=true;a.src=u;m.parentNode.insertBefore(a,m) })(window, document, 'DSPCounter', '//tags.soloway.ru/DSPCounter.min.js', 'script'); </script> <script> DSPCounter('firstSend', { 'sid': '000000', 'custom': {153: 'USER_ID'} }); </script> <!-- RTB Counter end -->
Parameters:
custom 153 (user_id) * — this parameter is used to transfer the value corresponding to the site user (converting the user's e-mail to lower case, calculating the hash using the MD5 algorithm) for identification by the system in case of loss of cookies or visiting the site from different devices.
2. Code for action
If you plan to view useful actions of users as part of the publication (product order, registration, subscription, etc.) then you need to install a code to account conversions with the additional possibility to transfer data about the action performed by the visitor on the site.
How to install a code:
It is possible to install the code on the page of the successfully performed action, as well as to use the code to log events - for example, when you need to account button click, etc. Details on installing code for logging events.
The code for action should be placed on the page after the cross-cutting code.
Example of code for action:
PLEASE NOTE! - The code provided here is an example. Valid codes in accordance with the data of your site in the system will be sent additionally.
<!-- RTB Counter --> <script type="text/javascript"> DSPCounter('send', { 'sid' : '000000', 'site_area' : '58mqabOe', 'user_id' : '', 'lead_id' : '', 'order_sum' : '' }); </script> <!-- RTB Counter end -->
Installation of events logging code
For dynamic events, such as adding a product to the cart, order, etc. that occur without reloading the page, you need to transfer data by calling a function with unique name where the argument is an object similar in its structure to the DSPCounter object.
Example of code:
<!-- RTB Counter --> <script> function callDSPCounter () { DSPCounter('send', { 'sid' : '000000', 'site_area' : '58mqabOe', 'user_id' : '', 'lead_id' : '', 'order_sum' : '' }); } </script> <!-- RTB Counter end -->
The onclick event can be used to account clicks on buttons and hyperlinks.
Example for a button:
<img src="/images/button.png" onclick="callSoloway();">
User ID. What is it used for?
Online advertising management system uses cookies to collect non-personal information that can be identified with the user's browser. One user can use several devices to access the Internet, each of these devices will have its own identifier in cookies, so for the system they will look like different users. Another technological feature of cookies is that their storage time depends not only on the system settings, but also on user actions (system update, forced deletion of cookies, clearing stored browser data, changing Internet service settings).
All these factors affect the effectiveness of communication with the user and, as a result, the course of the advertising campaign. To uniquely identify users and increase the effectiveness of advertising campaign it is necessary to transfer the authorized user’s data to the site using a special code parameter (user_id).
Thereafter, the system links information about behavior data not with a cookie, but with user ID. In order to preserve confidentiality, data about users must be transferred in a format previously processed using the MD5 algorithm, which allows you to encrypt a string without possibility to recover original message. For instance, you have following user e-mail: VPetrov@Mail.ru, after conversion into lower register we get vpetrov@mail.ru. If it is passed through MD5 algorithm following string is obtained - "bd28d9b08b82c5fbe999459edfda7d98".
It is impossible to recover the original e-mail from it, but each time the vpetrov@mail.ru string is sent to the MD5 function, the result is the same, so this data can be used for synchronization. Another advantage of unambiguous definition of users is the possibility to use additional CRM retargeting technology which allows to optimize communication with the user by broadcasting various advertising messages to individual segmented groups.
For example, showing a special banner to a group of users that has not been active during the last month or a group of users who have a birthday this month, and so on (depending on the segmentation of the site’s audience).