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.


Category page tracking tag

The category page configuration needs to be implemented on every category 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 category page and pass on product information if available.

How to implement

Add the configuration script to every category 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.

In the configuration also provide the info from the products available on the page. We recommend providing the info of the first 3 to 5 products. Please don’t fill in more than 5 products per page, since this might give an error in loading our tracking tag in some browsers. If there are no products on a category page, please leave out the product variables. This could be the case on i.e. a main category page, which contains only other categories and no products.

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
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!-- Start Shop2market Category page Configuration -->
<script type="text/javascript">
  window.s2m_configuration = new Object();
  window.s2m_configuration.s2m_page = "category";
  window.s2m_configuration.s2m_customer_id = "XXX";
  window.s2m_configuration.s2m_email_hash = "XXX";
  window.s2m_configuration.s2m_category = "XXX";
  window.s2m_configuration.s2m_subcategory = "XXX";
  window.s2m_configuration.s2m_category_path = "AAA / BBB / CCC";
  window.s2m_configuration.s2m_products = [];
 
  var product1 = new Object();
  product1.s2m_product_id = "XXX";
  product1.s2m_product_name = "XXX";
  product1.s2m_amount_1 = "XXX";
  product1.s2m_amount_2 = "XXX";
  window.s2m_configuration.s2m_products.push ( product1 );
 
  // Repeat per product, max 5 products
 
  var product2 = new Object();
  product2.s2m_product_id = "XXX";
  product2.s2m_product_name = "XXX";
  product2.s2m_amount_1 = "XXX";
  product2.s2m_amount_2 = "XXX";
  window.s2m_configuration.s2m_products.push ( product2 );
 
</script>
<!-- End Shop2market Category page Configuration -->

Variables in configuration

Variable

Requirement

Description

s2m_page

Required Type of page. In this case: category

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_category_path

Required Product category path. Possible separators are: / | >

s2m_products

Required if available Array / collection of products, every product contains the variables described below

Variables per product

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)

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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html>
<head>
  <title>Your Website Title</title>
  <meta name="title" content="Your Title" />
  <meta name="description" content="Your Description" />
    <!-- Start Shop2market Category page Configuration -->
  <script type="text/javascript">
    window.s2m_configuration = new Object();
    window.s2m_configuration.s2m_page = "category";
    window.s2m_configuration.s2m_customer_id = "user12345";
    window.s2m_configuration.s2m_email_hash = "37f0dd3c8f13127554e037a711c5a807";
    window.s2m_configuration.s2m_category = "Men";
    window.s2m_configuration.s2m_subcategory = "Footwear";
    window.s2m_configuration.s2m_category_path = "Men / Footwear";
    window.s2m_configuration.s2m_products = [];
 
    var product1 = new Object();
    product1.s2m_product_id = "91283461";
    product1.s2m_product_name = "Sneakers Nike";
    product1.s2m_amount_1 = "79.99";
    product1.s2m_amount_2 = "66.11";
    window.s2m_configuration.s2m_products.push ( product1 );
 
    var product2 = new Object();
    product2.s2m_product_id = "2345623";
    product2.s2m_product_name = "Sneakers Adidas";
    product2.s2m_amount_1 = "4.99";
    product2.s2m_amount_2 = "4.12";
    window.s2m_configuration.s2m_products.push ( product2 );
 
    var product3 = new Object();
    product3.s2m_product_id = "1287635";
    product3.s2m_product_name = "Sneakers Lotto";
    product3.s2m_amount_1 = "4.99";
    product3.s2m_amount_2 = "4.12";
    window.s2m_configuration.s2m_products.push ( product3 );
 
    var product4 = new Object();
    product4.s2m_product_id = "8176241";
    product4.s2m_product_name = "Sneakers Nike";
    product4.s2m_amount_1 = "4.99";
    product4.s2m_amount_2 = "4.12";
    window.s2m_configuration.s2m_products.push ( product4 );
 
    var product5 = new Object();
    product5.s2m_product_id = "7123461";
    product5.s2m_product_name = "Sneakers Lotto";
    product5.s2m_amount_1 = "4.99";
    product5.s2m_amount_2 = "4.12";
    window.s2m_configuration.s2m_products.push ( product5 );
 
  </script>
    <!-- End Shop2market Category 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>