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.
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) |