Adcurve - Boost your profit

Implementation / Tags

This documentation describes how to implement Adcurve on your website.Adcurve has two different tags which are required to make full use of the power and features that Adcurve offers.


Product page tracking tag

The product page configuration needs to be implemented on every product page of your website. The configuration is an addition to the Tracking Tag. It lets the Tracking Tag know it's being launched on a product page and can pass on product information.

How to implement

Add the configuration script to every product page of your site in the < head > tag of the document. This way you make sure the configuration will be executed before the Tracking Tag is loaded. If this is not possible for some reason; make sure the configuration is placed above the Tracking Tag.

The configuration needs to be filled with the info from the product on the current page.

Below you find an example of the category page configuration. Please integrate this JavaScript code as shown below. Do not make any changes to it or we cannot guarantee our tracking.

Code to use

Paste the code below inside the < head > tag of your website Replace XXX with the appropriate values. If there is no value, please leave blank, or leave out the complete variable.


1
2
3
4
5
6
7
8
9
10
11
12
13
<!-- Start Shop2market Product page Configuration -->
<script type="text/javascript">
  window.s2m_configuration = new Object();
  window.s2m_configuration.s2m_page = "product";
  window.s2m_configuration.s2m_customer_id = "XXX";
  window.s2m_configuration.s2m_email_hash = "XXX";
  window.s2m_configuration.s2m_product_id = "XXX";
  window.s2m_configuration.s2m_product_name = "XXX";
  window.s2m_configuration.s2m_amount_1 = "XXX";
  window.s2m_configuration.s2m_amount_2 = "XXX";
  window.s2m_configuration.s2m_stock = "XXX";
</script>
<!-- End Shop2market Product page Configuration -->

Variables in configuration

Variable

Requirement

Description

s2m_page

Required Type of page. In this case: product

s2m_customer_id

Required Customer id of signed in users

s2m_email_hash

Required MD5 hash of e-mail of signed in users (used in retargeting purposes)

s2m_product_id

Required Product ID (must be same as in feed!)

s2m_product_name

Optional Name of the product (escape double quotes)

s2m_amount_1

Optional Product price including tax (two decimals, dot separated e.g. 79.99)

s2m_amount_2

Optional Product price excluding tax (two decimals, dot separated e.g. 66.11)

s2m_stock

Optional Amount of products in stock

Example page


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html>
<head>
  <title>Your Website Title</title>
  <meta name="title" content="Your Title" />
  <meta name="description" content="Your Description" />
  <!-- Start Shop2market Product page Configuration -->
  <script type="text/javascript">
    window.s2m_configuration = new Object();
    window.s2m_configuration.s2m_page = "product";
    window.s2m_configuration.s2m_customer_id = "user12345";
    window.s2m_configuration.s2m_email_hash = "37f0dd3c8f13127554e037a711c5a807";
    window.s2m_configuration.s2m_product_id = "12345";
    window.s2m_configuration.s2m_product_name = "Sneakers Nike";
    window.s2m_configuration.s2m_amount_1 = "79.99";
    window.s2m_configuration.s2m_amount_2 = "66.11";
    window.s2m_configuration.s2m_stock = "60";
  </script>
  <!-- End Shop2market Product page Configuration -->
</head>
<body>
<!-- Start Shop2market Tracking Tag -->
  <script type="text/javascript">
    // Do not edit anything below or we cannot guarantee our tracking!
    try{
      var __s2m_host_prefix = (("https:" == document.location.protocol) ? "https://" : "http://");
      var __s2m_link = "track.shop2market.com/track_visit.js?shop_code=REPLACE_WITH_SHOPCODE&v=2.1.20160413";
      var __s2m_js = document.createElement('script');
      __s2m_js.type = 'text/javascript'; __s2m_js.async = true;
      __s2m_js.src = __s2m_host_prefix + __s2m_link;
      __s2m_js.onerror = function(){
        if( typeof( __s2mPixel ) === "undefined" &&
        typeof( window.OnS2MPixelFail ) === "function" ){OnS2MPixelFail();}
      }
      var __s2m_script = document.getElementsByTagName('script')[0];
      __s2m_script.parentNode.insertBefore( __s2m_js, __s2m_script );
    }
    catch(err){}
  </script>
  <!-- Start Shop2market backup Image Tracking tag -->
  <noscript>
    <img src="//track.shop2market.com/v3/tvi.gif?shop_code=REPLACE_WITH_SHOPCODE&v=2.1.20160413" height="1" width="1" border="0" style="border:0px;display:block;" />
  </noscript>
  <!-- End Shop2market backup Tracking Image tag -->
<!-- End Shop2market Tracking Tag -->
 
//rest of your website here
 
</body>
</html>