Skip to content

Script Tracking Client-Side

Introduction

Thanks to the implementation of our conversion tracking script, Click2Buy is able to collect validated sales generated by users coming from our solution.

This tracking enables brands to accurately measure the ROI of the traffic directed to retailer websites via the Click2Buy Where to Buy solution.

To set up the tracking, you will need your Retailer Key, which will be provided by your Click2Buy Retailer Account Manager. This identifier will be used in both available implementation methods.

Two implementation methods are available:

🏷️ Via Google Tag Manager

Recommended — the simplest and fastest method to implement.

💻 Via a native implementation

Direct integration within the website code.

Implementation via Google Tag Manager

We have developed an official Google Tag Manager template that allows for easy implementation of Click2Buy conversion tracking. This template enables retailers to configure tracking without needing to write any custom code. To install the tag, simply refer to our GitHub documentation, which includes:

  • detailed installation instructions
  • the template file to import into Google Tag Manager
  • the steps required to configure the tag

During the tag configuration, you will only need to enter your Retailer Key, which will be provided by your Click2Buy contact.

👉 All documentation and required files are available here: https://github.com/Click2Buy/gtm-web-template/tree/master?tab=readme-ov-file


Native Implementation (direct code)

If you do not wish to use Google Tag Manager, it is also possible to implement the tracking script directly within your website's code. To do so :

  1. Add the provided script just before the closing </body> tag on the order confirmation page.

  2. Replace the Retailer Key in the script with the identifier provided by your Click2Buy Retailer Account Manager.

html
<script>
(function(i,s,o,g,r,a,m){
  i[r] = i[r] || {q:[],validationProcess:function(){
    i[r].q.push(arguments)
  }};
  a = s.createElement(o);
  m = s.getElementsByTagName(o)[0];
  a.async = 1;
  a.src = g;
  m.parentNode.insertBefore(a,m);
})(window,document,'script','https://rs.clic2buy.com/retailers/Retailer_Key.js','C2B');
C2B.validationProcess();
</script>

⚠️ Warning : When copying and pasting the script into certain text editors, quotation marks (" ") may be automatically modified. Please ensure they are correctly formatted to avoid any errors in the script execution.

Domains to whitelist

Our tag uses multiple subdomains to function correctly. If your security policy blocks the loading of external scripts, it is necessary to allow the following domains.

You can allow:

  • *.clic2buy.com
  • *.clic2drive.com
  • *.click2buy.com

Or allow the following specific domains:

  • rs.clic2buy.com (mandatory) Domain where the tracking script is hosted.

  • t.clic2buy.com (mandatory) Domain used for our third-party cookies. It allows retrieving the anonymous ID assigned to users from our solution on your site.

  • analytics.clic2drive.com (mandatory) Domain that allows retrieving basket information via the user ID and recording the sale validation.

Data collected

Our tag only collects basket confirmations coming from Click2Buy redirects.

No personal data is collected.

When a user arrives on the retailer’s site via the Where to Buy solution, an anonymous cookie is created to identify the traffic source and measure conversions.

Click2Buy is GDPR compliant.

For any questions related to data protection, you can contact our DPO:

Artaches Kherounts📧 dpo@click2buy.com📞 +33 3 66 72 29 04