---
title: 'All Criteo OneTag events and parameters'
description: 'Note: Adding OneTag events and parameters directly to a website''s source code requires solid technical knowledge or assistance from a developer. This guide…'
language: en
guide: vZbzbEeY86
updated: 2026-08-31T16:27:38Z
canonical: https://help.criteo.com/kb/guide/en/all-criteo-onetag-events-and-parameters-vZbzbEeY86/Steps/775825
alternates:
  de: https://help.criteo.com/kb/guide/de/alle-criteo-onetag-events-und-parameter-vZbzbEeY86.md
  es: https://help.criteo.com/kb/guide/es/todos-los-eventos-y-parametros-de-criteo-onetag-vZbzbEeY86.md
  fr: https://help.criteo.com/kb/guide/fr/tous-les-evenements-et-parametres-criteo-onetag-vZbzbEeY86.md
  it: https://help.criteo.com/kb/guide/it/tutti-gli-eventi-e-i-parametri-di-criteo-onetag-vZbzbEeY86.md
  ja: https://help.criteo.com/kb/guide/ja/criteo-tag-vZbzbEeY86.md
  ko: https://help.criteo.com/kb/guide/ko/criteo-onetag-vZbzbEeY86.md
  pt-BR: https://help.criteo.com/kb/guide/pt-BR/todos-os-eventos-e-parametros-da-criteo-onetag-vZbzbEeY86.md
  zh: https://help.criteo.com/kb/guide/zh/criteo-onetag-vZbzbEeY86.md
  zh-CN: https://help.criteo.com/kb/guide/zh-CN/all-criteo-onetag-events-and-parameters-vZbzbEeY86.md
---

> Index of this knowledge base: https://help.criteo.com/llms.txt
>
> Interactive version: https://help.criteo.com/kb/guide/en/all-criteo-onetag-events-and-parameters-vZbzbEeY86/Steps/775825

# All Criteo OneTag events and parameters

<a id="step-775825"></a>

## All Criteo OneTag events and parameters

> **Tip:** **Note:** Adding OneTag events and parameters directly to a website's source code requires solid technical knowledge or assistance from a developer.

  
This guide outlines all the available OneTag events and parameters you can use on a website. Each event is explained in detail.

> **Tip:** Keep in mind that you likely won’t implement all of these tags. In most cases, you’ll only need a subset that aligns with your specific goals.

- If "Loader script": [Loader script](#step-868657)
- If "Visit tag": [Visit tag](#step-868659)
- If "Homepage tag": [Homepage tag](#step-868656)
- If "Category/keyword search/listing tag": [Category/keyword search/listing tag](#step-868660)
- If "Travel search tag": [Travel search tag](#step-868655)
- If "Product tag": [Product tag](#step-868658)
- If "Add to cart tag": [Add to cart tag](#step-868653)
- If "Basket/cart tag": [Basket/cart tag](#step-868654)
- If "Sales tag": [Sales tag](#step-868652)
- If "Lead tag": [Lead tag](#step-5039946)
- If "Common parameters": [Common parameters](#step-5039945)

<a id="step-868657"></a>

## Loader script

```javascript
<!-- Criteo Loader File --> 
<script   type="text/javascript"   src="//dynamic.criteo.com/js/ld/ld.js?a=YOUR_PARTNER_ID"   async="true" ></script> 
<!-- END Criteo Loader File -->
```

The loader script tag is required to enable the rest of the Criteo OneTag events.

Add the code snippets on the left to the `<head>` section of all the web pages so it avoids being delayed by another synchronously loaded script.

It only needs to be triggered once per page but calling the script multiple times on a single page will not break anything.

| **Variable** | **Description** | **Example** | **Syntax** | **Required** |
| --- | --- | --- | --- | --- |
| `YOUR_PARTNER_ID` | Partner Id is a unique ID that can be found in your Commerce Growth Url. | [https://marketing.criteo.com/technical-setup/assets-tags/implementation?advertiserId=93844&partnerId=**101269**](https://marketing.criteo.com/technical-setup/assets-tags/implementation?advertiserId=93844&partnerId=101269) | String | Required |

This path ends here.

<a id="step-868659"></a>

## Visit tag

```javascript
<!-- Criteo Visit Tag --> 
<script type="text/javascript">   
window.criteo_q = window.criteo_q || [];   
var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";   
window.criteo_q.push(     
  { event: "setAccount", account: YOUR_PARTNER_ID},     
  { event: "setEmail", email: "##Email Address##", hash_method: "##Hash Method##" },  
  { event: "setSha256HashedPhoneNumber", phone_number: "##Hashed phone number##" },
  { event: 'setPhoneNumber', phone_number: '##Plain text phone number##' },   
  { event: "setSiteType", type: deviceType},     
  { event: "setCustomerId", id: "##Customer Id##" },     
  { event: "setRetailerVisitorId", id: "##Visitor Id##"},     
  { event: "setZipcode", zipcode: "##Zip Code##" },     
  { event: "viewPage" }   ); 
</script>  <!-- END Criteo Visit Tag -->
```

Add this code snippet to the `<head>` section of all the web pages so it avoids being delayed by another synchronously loaded script.

It only needs to be triggered once per page but calling the script multiple times on a single page will not break anything.

The visit tag helps to capture real landing and bounce rates on your site.

Please fire this event on all pages where no other event is being triggered.  
  
For full information on how to manage your website policy, click [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075).  
It only needs to be triggered once per page, but calling the script multiple times on a single page will not break anything.  
Dynamically replace fields surrounded by ## and ## with values, ensuring that all # symbols are removed.  
  
See the table for more information on the fields.

> **Tip:** **Tip:** For an optimum viewing experience, please expand the table by clicking the expand icon in the top-right corner of the table.

| Fields | Overview | Example | Syntax | Required |
| --- | --- | --- | --- | --- |
| Email Address | Email address in plain text (if allowed by the law in your country), sha256 hashed email address, or MD5 hashed email address.  <br>  <br>For more information, click [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075). | 79054025255fbla26e4bc422aef54eb4... | \- Plain text<br>Email<br>\- Sha256 and md5 hashed emails | Required |
| Hash Method | The hashing method used for the email.<br>\- Doesn't need to be included for plain text<br>emails<br>\- For sha265 hashed emails: "sha256"<br>\- For md5 hashed emails: 'md5" | sha256 | String | Required |
| Phone number | Phone number in SHA256 hashed format or in plain text. Depending on the choice of format, you should use the appropriate event: setSha256HashedPhoneNumber or setPhoneNumber, respectively. Check [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,4106561) for more information. | fda66831d0cb0eb4bffb21bc795308d69921c211c57be0ae15702071e3b9e989 | \-Plain text phone numbers -SHA256 hashed phone numbers | Recommended |
| Customer ID | A non PII value that can identify a unique user in a client's CRM. Examples: CRM id, user's login. The result that is passed to the tag must not be sent in plain value, it needs to be encrypted (MD5 or SHA256) | 49168a5c8493ec2c0bf489821c21fc3b | String | Recommended |
| Visitor ID | A unique Id that is consistent across multiple<br>sessions for an unauthenticated user. Example: First party cookie id | 53e20ea700424f7bbdd793b02abcb5d7 | String | Recommended |
| Zip Code | User's shipping address zip code. | 12345 | String | Recommended |
| `YOUR_PARTNER_ID` | partnerID is a unique ID that can be found in your Commerce Growth Url. | [https://marketing.criteo.com/technical-setup/assets-tags/implementation?advertiserId=93844&partnerId=**101269**](https://marketing.criteo.com/technical-setup/assets-tags/implementation?advertiserId=93844&partnerId=101269) | String | Required |

This path ends here.

<a id="step-868656"></a>

## Homepage tag

```javascript
<!-- Criteo Homepage Tag -->
<script type="text/javascript">
window.criteo_q = window.criteo_q || [];   
var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";   window.criteo_q.push(     
        { event: "setAccount", account: YOUR_PARTNER_ID},     
        { event: "setEmail", email: "##Email Address##", hash_method: "##Hash Method##" },     
        { event: "setSiteType", type: deviceType},     
        { event: "setCustomerId", id: "##Customer Id##" },     
        { event: "setRetailerVisitorId", id: "##Visitor Id##"},     
        { event: "setZipcode", zipcode: "##Zip Code##" },     
        { event: "viewHome" }   
        );
</script>
<!-- END Criteo Homepage Tag -->
```

Add this code snippets to the `<head>` section of your web site's home page.

Implementing the Criteo OneTag on your **homepage** allows us to track bouncers (users who land on your homepage and leave your site without making a purchase). We will automatically evaluate the value of these users and may display banners with best-seller products.

This tag should fire on the homepage or main landing page of your site to tag users and add them to the target audience.  
  
Fire this event on the homepage or main landing page of your site.   
  
For full information on how to manage your website policy, click [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075).  
It only needs to be triggered once per page, but calling the script multiple times on a single page will not break anything.  
Dynamically replace fields surrounded by ## and ## with values, ensuring that all # symbols are removed.  
  
See the table for more info on the fields.

> **Tip:** **Tip:** For optimum viewing experience, please expand the table by clicking the expand icon on the top-right corner of the table.

| Fields | Overview | Example | Syntax | Required |
| --- | --- | --- | --- | --- |
| Email Address | Email address in plain text (if allowed by the law in your country), sha256 hashed email address, or MD5 hashed email address.  <br>  <br>For more information, click [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075). | 79054025255fbla26e4bc422aef54eb4... | \- Plain text<br>Email<br>\- Sha256 and md5 hashed emails | Required |
| Hash Method | The hashing method used for the email.<br>\- Doesn't need to be included for plain text<br>emails<br>\- For sha265 hashed emails: "sha256"<br>\- For md5 hashed emails: 'md5" | sha256 | String | Required |
| Phone number | Phone number in SHA256 hashed format or in plain text. Depending on the choice of format, you should use the appropriate event: setSha256HashedPhoneNumber or setPhoneNumber, respectively. Check [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,4106561) for more information. | fda66831d0cb0eb4bffb21bc795308d69921c211c57be0ae15702071e3b9e989 | \-Plain text phone numbers -SHA256 hashed phone numbers | Recommended |
| Customer ID | A non PII value that can identify a unique user in a client's CRM. Examples: CRM id, user's login. The result that is passed to the tag must not be sent in plain value, it needs to be encrypted (MD5 or SHA256) | 49168a5c8493ec2c0bf489821c21fc3b | String | Recommended |
| Visitor ID | A unique Id that is consistent across multiple<br>sessions for an unauthenticated user. Example: First-party cookie id | 53e20ea700424f7bbdd793b02abcb5d7 | String | Recommended |
| Zip Code | User's shipping address zip code. | 12345 | String | Recommended |
| `YOUR_PARTNER_ID` | partnerID is a unique ID that can be found in your Commerce Growth Url. | [https://marketing.criteo.com/technical-setup/assets-tags/implementation?advertiserId=93844&partnerId=**101269**](https://marketing.criteo.com/technical-setup/assets-tags/implementation?advertiserId=93844&partnerId=101269) | String | Required |

This path ends here.

<a id="step-868660"></a>

## Category/keyword search/listing tag

```javascript
<!-- Criteo Listing Tag -->
<script type="text/javascript">
    window.criteo_q = window.criteo_q || [];   
    var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";   
    window.criteo_q.push(     
        { event: "setAccount", account: YOUR_PARTNER_ID},     
        { event: "setEmail", email: "##Email Address##", hash_method: "##Hash Method##" },     
        { event: "setSiteType", type: deviceType},     
        { event: "setCustomerId", id: "##Customer Id##" },     
        { event: "setRetailerVisitorId", id: "##Visitor Id##"},     
        { event: "setZipcode", zipcode: "##Zip Code##" },     
        { event: "viewList",       
            item: [ "##Product Id 1##", "##Product Id 2##", "##Product Id 3##" ],       
            category: "##Category##",       
            keywords: "##Search Keyword##",       
            page_number: ##Page Number##,       
            filters:[         
                {name: "#Filter Name#", operator: "#Filter Operator#", value: "#Filter Value#"},         
                /* add a line for each additional filter */     
            ]     
        }   
    );
</script>
<!-- END Criteo Listing Tag -->
```

Add these code snippets to the `<head>` section of pages with more than one product being recommended.

This page can be a search results page, a category listing, or a simple page recommending more than one product.

> **Warning:** Please note, this **does NOT mean** you should fire this tag on a product page with a "recommended products" section.

For full information on how to manage your website policy, click [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075).  
It only needs to be triggered once per page, but calling the script multiple times on a single page will not break anything.  
Dynamically replace fields surrounded by ## and ## with values, ensuring that all # symbols are removed.  
  
See the table for more info on the fields.

> **Tip:** **Tip:** For optimum viewing experience, please expand the table by clicking the expand icon on the top-right corner of the table.

| Fields | Overview | Example | Syntax | Required |
| --- | --- | --- | --- | --- |
| Email Address | Plain-text or SHA256<br>Hashed email address  <br>  <br>For more information, click [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075). | 79054025255fb1a26e4bc422aef54eb4 | String | Required |
| Hash<br>Method | The hashing method used for the email.<br>Please put "none" for<br>plaintext emails and<br>"sha256" for SHA265<br>hashed emails | sha256 | String | Required |
| Phone number | Phone number in SHA256 hashed format or in plain text. Depending on the choice of format, you should use the appropriate event: setSha256HashedPhoneNumber or setPhoneNumber, respectively. Check [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,4106561) for more information. | fda66831d0cb0eb4bffb21bc795308d69921c211c57be0ae15702071e3b9e989 | \-Plain text phone numbers -SHA256 hashed phone numbers | Recommended |
| Customer | A non PII value that can identify a unique user in a client's CRM. Examples: CRM id, user's login. The result that is passed to the tag must not be sent in plain value, it needs to be encrypted (MD5 or SHA256) | 49f68a5c8493ec2c0bf489821c21fc3b | String | Recommended |
| Visitor ID | A unique Id that is consistent across<br>multiple sessions for an<br>unauthenticated user.<br>Example: First party<br>cookie id | 53e20ea7004247bbdd793b02abcb5d7 | String | Recommended |
| Zip code | User's shipping address zip code | 12345 | String | Recommended |
| Product ID | Unique ID of the product | a123 String Yes | String | Recommended |
| Category | The category of the page<br>that the user is browsing<br>This value should match<br>the category values that<br>are sent in your product<br>catalog | Electronics>Audio>Headphones | String with<br>the same<br>format as<br>your<br>product<br>catalog | Recommended |
| Search<br>keyword | The keyword entered by<br>the user | headphones | String | Recommended |
| Page<br>number | The page number. In the<br>case of a single endless<br>page, this should be set<br>as 1 | 1 | Integer | Recommended |
| Filters | Applied filters on the<br>page. If you have<br>multiple selections of a<br>single filter, use a comma<br>to separate each. See<br>below for details and an<br>example | \[{name: "brand", operator: "eq", value:<br>"Bose, Sony")\] | Array of<br>objects | No |
| `YOUR_PARTNER_ID` | partnerID is a unique ID that can be found in your Commerce Growth Url. | [https://marketing.criteo.com/technical-setup/assets-tags/implementation?advertiserId=93844&partnerId=**101269**](https://marketing.criteo.com/technical-setup/assets-tags/implementation?advertiserId=93844&partnerId=101269) | String | Required |

This path ends here.

<a id="step-868655"></a>

## Travel search tag

```javascript
<!-- Criteo Search Tag -->
<script type="text/javascript">
    window.criteo_q = window.criteo_q || [];   
    var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";   
    window.criteo_q.push(     
        { event: "setAccount", account: YOUR_PARTNER_ID},     
        { event: "setEmail", email: "##Email Address##", hash_method: "##Hash Method##" },     
        { event: "setSiteType", type: deviceType},     
        { event: "setCustomerId", id: "##Customer Id##" },     
        { event: "setRetailerVisitorId", id: "##Visitor Id##"},     
        { event: "setZipcode", zipcode: "##Zip Code##" },     
        { event: "viewSearch",       
            checkin_date: "##Checkin Date##",       
            checkout_date: "##Checkout Date##",      
            nbra: "##Number of Adults##",       
            nbrc: "##Number of Children##",       
            nbri: "##Number of Infants##",       
            nbrr: "##Number of Rooms##"     
        },     
        { event: "viewItem", item: "##Product Id##" }   
    );
</script>
<!-- END Criteo Search Tag -->
```

> **Tip:** **This event is used by travel clients.**
>
> If you do not have a travel site, you can skip this tag.

  
This tag should fire on search result pages after a user has expressed interest in a particular item (flight, train ride, car rental, etc..). It provides our engine with specifics about the customer's interests and items they might also be interested in.  
  
Fire this event on any search result page after a user has entered the details about the search.    
  
For full information on how to manage your website policy, click [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075).  
It only needs to be triggered once per page, but calling the script multiple times on a single page will not break anything.  
Dynamically replace fields surrounded by ## and ## with values, ensuring that all # symbols are removed.  
  
See the table for more info on the fields.  

> **Tip:** **Tip:** For optimum viewing experience, please expand the table by clicking the expand icon on the top-right corner of the table.

| FIELDS | OVERVIEW | EXAMPLE | SYNTAX | REQUIRED |
| --- | --- | --- | --- | --- |
| Email Address | Plain-text or SHA256 Hashed email address  <br>  <br>For more information, click [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075). | 79054026255fb1a26e4bc422oef54eb4 | String | Required |
| Hash<br>method | The hashing method used for the email. Please put<br>"none" for plain text emails<br>and "sha256" for SHA265<br>hashed emails | sho256 | String | Required |
| Phone number | Phone number in SHA256 hashed format or in plain text. Depending on the choice of format, you should use the appropriate event: setSha256HashedPhoneNumber or setPhoneNumber, respectively. Check [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,4106561) for more information. | fda66831d0cb0eb4bffb21bc795308d69921c211c57be0ae15702071e3b9e989 | \-Plain text phone numbers -SHA256 hashed phone numbers | Recommended |
| Customer ID | A non PII value that can identify a unique user in a client's CRM. Examples: CRM id, user's login. The result that is passed to the tag must not be sent in plain value, it needs to be encrypted (MD5 or SHA256) | 49f68a5c8493ec2c0bf489821c21fc3b | String | Recommended |
| Visitor ID | A unique Id that is  consistent across multiple<br>sessions for on<br>unauthenticated user.<br>Example: First party<br>cookie id | 53e20ea700424f7bbdd793b02abcb5d7 | String | Recommended |
| Zip code | User's shipping address<br>zip code | 12345 | String | Recommended |
| Product ID | Unique ID of the product.    Example: flight ID | a123 | String | Yes |
| Check-in<br>date | Departure date info | "2021-06-01" | MM-DD" | Recommended |
| Check-out date | Return date info | "2021-06-08" | MM-DD" | Recommended |
| Number of adults | The number of adult passengers | 1 | Integer | Recommended |
| Number of children | The number of child passengers | 0 | Integer | Recommended |
| Number of infants | The number of infant passengers | 0 | Integer | Recommended |
| Number of rooms | The number of rooms | 0 | Integer | Recommended |
| `YOUR_PARTNER_ID` | Partner Id is a unique ID that can be found in your Commerce Growth Url. | [https://marketing.criteo.com/technical-setup/assets-tags/implementation?advertiserId=93844&partnerId=**101269**](https://marketing.criteo.com/technical-setup/assets-tags/implementation?advertiserId=93844&partnerId=101269) | String | Required |

This path ends here.

<a id="step-868658"></a>

## Product tag

```javascript
<!-- Criteo Product Tag -->
<script type="text/javascript">
    window.criteo_q = window.criteo_q || [];   
    var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
    window.criteo_q.push(    
        { event: "setAccount", account: YOUR_PARTNER_ID},     
        { event: "setEmail", email: "##Email Address##", hash_method: "##Hash Method##" },     
        { event: "setSiteType", type: deviceType},     
        { event: "setCustomerId", id: "##Customer Id##" },     
        { event: "setRetailerVisitorId", id: "##Visitor Id##"},     
        { event: "setZipcode", zipcode: "##Zip Code##" },     
        { event: "viewItem",        
            item: "##Product ID##",        
            price: "##price##",        
            availability: "##Availability##"      
        }   
    );
</script>
<!-- END Criteo Product Tag -->
```

The "product tag" gives Criteo's algorithm a clear flag for the product a user is looking at.

Add this code snippet to the `<head>` section of any product details page.  
  
For full information on how to manage your website policy, click [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075).  
It only needs to be triggered once per page, but calling the script multiple times on a single page will not break anything.  
Dynamically replace fields surrounded by ## and ## with values, ensuring that all # symbols are removed.  
  
See the table for more info on the fields.

> **Tip:** **Tip:** For optimum viewing experience, please expand the table by clicking the expand icon on the top-right corner of the table.

| FIELDS | OVERVIEW | EXAMPLE | SYNTAX | REQUIRED |
| --- | --- | --- | --- | --- |
| Email Address | Email address in plain text (if allowed by the law in your country), sha256 hashed email address, or MD5 hashed email address.  <br>  <br>For more information, click [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075). | 79054025255fbla26e4bc422aef54eb4... | \- Plain text<br>Email<br>\- Sha256 and md5 hashed emails | Required |
| Hash Method | The hashing method used for the email.<br>\- Doesn't need to be included for plain text<br>emails<br>\- For sha265 hashed emails: "sha256"<br>\- For md5 hashed emails: 'md5" | sha256 | String | Required |
| Phone number | Phone number in SHA256 hashed format or in plain text. Depending on the choice of format, you should use the appropriate event: setSha256HashedPhoneNumber or setPhoneNumber, respectively. Check [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,4106561) for more information. | fda66831d0cb0eb4bffb21bc795308d69921c211c57be0ae15702071e3b9e989 | \-Plain text phone numbers -SHA256 hashed phone numbers | Recommended |
| Customer ID | A non PII value that can identify a unique user in a client's CRM. Examples: CRM id, user's login. The result that is passed to the tag must not be sent in plain value, it needs to be encrypted (MD5 or SHA256) | 49168a5c8493ec2c0bf489821c21fc3b | String | Recommended |
| Visitor ID | A unique Id that is consistent across multiple<br>sessions for an unauthenticated user. Example: First-party cookie id | 53e20ea700424f7bbdd793b02abcb5d7 | String | Recommended |
| Zip Code | User's shipping address zip code. | 12345 | String | Recommended |
| Product ID | Unique ID of the product | a123 String Yes | String | Required |
| Price | Unit price of the product | 20 | Double | No |
| Availability | Product availability status. 1 if the product is in stock and 0 if the product is out of stock | 1 | Boolean | No |
| `YOUR_PARTNER_ID` | Partner Id is a unique ID that can be found in your Commerce Growth Url. | [https://marketing.criteo.com/technical-setup/assets-tags/implementation?advertiserId=93844&partnerId=**101269**](https://marketing.criteo.com/technical-setup/assets-tags/implementation?advertiserId=93844&partnerId=101269) | String | Required |

This path ends here.

<a id="step-868653"></a>

## Add to cart tag

```javascript
<!-- Criteo Add to Cart Tag -->
<script type="text/javascript">
    window.criteo_q = window.criteo_q || [];   
    var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
    window.criteo_q.push(     
        { event: "setAccount", account: YOUR_PARTNER_ID},     
        { event: "setEmail", email: "##Email Address##", hash_method: "##Hash Method##" },     
        { event: "setSiteType", type: deviceType},     
        { event: "setCustomerId", id: "##Customer Id##" },     
        { event: "setRetailerVisitorId", id: "##Visitor Id##"},     
        { event: "setZipcode", zipcode: "##Zip Code##" },     
        { event: "addToCart", item: [       
            {id: "##Product Id##", price: "##Price##", quantity: "##Quantity##" }     
        ]}   
    );
</script>
<!-- END Criteo Add to Cart Tag -->
```

This tag helps flag users who add items to the cart. This is useful for having a complete abandoned cart audience and not missing users who add to their cart but don't visit the actual cart page.  
  
Add this code snippet to the `<head>` section of the Add to Cart page. Please fire this event after a user adds an item to the cart.  
  
For full information on how to manage your website policy, click [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075).  
It only needs to be triggered once per page, but calling the script multiple times on a single page will not break anything.  
Dynamically replace fields surrounded by ## and ## with values, ensuring that all # symbols are removed.  
  
See the table for more info on the fields.

> **Tip:** **Tip:** For optimum viewing experience, please expand the table by clicking the expand icon on the top-right corner of the table.

| FIELDS | OVERVIEW | EXAMPLE | SYNTAX | REQUIRED |
| --- | --- | --- | --- | --- |
| Email Address | Email address in plain text (if allowed by the law in your country), sha256 hashed email address, or MD5 hashed email address  <br>  <br>For more information, click [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075). | 79054025255fbla26e4bc422aef54eb4... | \- Plain text<br>Email<br>\- Sha256 and md5 hashed emails | Required |
| Hash Method | The hashing method used for the email.<br>\- Doesn't need to be included for plain text<br>emails<br>\- For sha265 hashed emails: "sha256"<br>\- For md5 hashed emails: 'md5" | sha256 | String | Required |
| Phone number | Phone number in SHA256 hashed format or in plain text. Depending on the choice of format, you should use the appropriate event: setSha256HashedPhoneNumber or setPhoneNumber, respectively. Check [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,4106561) for more information. | fda66831d0cb0eb4bffb21bc795308d69921c211c57be0ae15702071e3b9e989 | \-Plain text phone numbers -SHA256 hashed phone numbers | Recommended |
| Customer ID | A non PII value that can identify a unique user in a client's CRM. Examples: CRM id, user's login. The result that is passed to the tag must not be sent in plain value, it needs to be encrypted (MD5 or SHA256) | 49168a5c8493ec2c0bf489821c21fc3b | String | Recommended |
| Visitor ID | A unique Id that is consistent across multiple<br>sessions for an unauthenticated user. Example: First-party cookie id | 53e20ea700424f7bbdd793b02abcb5d7 | String | Recommended |
| Zip Code | User's shipping address zip code. | 12345 | String | Recommended |
| Product ID | Unique ID of the product | a123 String Yes | String | Required |
| Price | Unit price of the product | 20 | Double | Required |
| Quantity | The number of a specific item that the consumer added to the cart | 2 | Integer | Required |
| `YOUR_PARTNER_ID` | Partner Id is a unique ID that can be found in your Commerce Growth Url. | [https://marketing.criteo.com/technical-setup/assets-tags/implementation?advertiserId=93844&partnerId=**101269**](https://marketing.criteo.com/technical-setup/assets-tags/implementation?advertiserId=93844&partnerId=101269) | String | Required |

This path ends here.

<a id="step-868654"></a>

## Basket/cart tag

```javascript
<!-- Criteo Basket / Cart Tag -->
<script type="text/javascript">
    window.criteo_q = window.criteo_q || [];   
    var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
    window.criteo_q.push(     
        { event: "setAccount", account: YOUR_PARTNER_ID},     
        { event: "setEmail", email: "##Email Address##", hash_method: "##Hash Method##" },     
        { event: "setSiteType", type: deviceType},     
        { event: "setCustomerId", id: "##Customer Id##" },     
        { event: "setRetailerVisitorId", id: "##Visitor Id##"},     
        { event: "setZipcode", zipcode: "##Zip Code##" },     
        { event: "viewBasket", item: [       
            {id: "##Product Id##", price: "##Price##", quantity: "##Quantity##" }        
            /* add a line for each additional line in the basket */   
        ]}   
    );
</script>
<!-- END Criteo Basket / Cart Tag -->
```

This tag helps flag users who visit the cart page. This is useful for having a completely abandoned cart audience.

Add this code snippet to the `<head>` section of the "cart" page of the website.  
  
For full information on how to manage your website policy, click [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075).  
It only needs to be triggered once per page, but calling the script multiple times on a single page will not break anything.  
Dynamically replace fields surrounded by ## and ## with values, ensuring that all # symbols are removed.  
  
See the table for more info on the fields.

> **Tip:** **Tip:** For optimum viewing experience, please expand the table by clicking the expand icon on the top-right corner of the table.

| FIELDS | OVERVIEW | EXAMPLE | SYNTAX | REQUIRED |
| --- | --- | --- | --- | --- |
| Email Address | Email address in plain text (if allowed by the law in your country), sha256 hashed email address, or MD5 hashed email address  <br>  <br>For more information, click [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075). | 79054025255fbla26e4bc422aef54eb4... | \- Plain text<br>Email<br>\- Sha256 and md5 hashed emails | Required |
| Hash Method | The hashing method used for the email.<br>\- Doesn't need to be included for plain text<br>emails<br>\- For sha265 hashed emails: "sha256"<br>\- For md5 hashed emails: 'md5" | sha256 | String | Required |
| Phone number | Phone number in SHA256 hashed format or in plain text. Depending on the choice of format, you should use the appropriate event: setSha256HashedPhoneNumber or setPhoneNumber, respectively. Check [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,4106561) for more information. | fda66831d0cb0eb4bffb21bc795308d69921c211c57be0ae15702071e3b9e989 | \-Plain text phone numbers -SHA256 hashed phone numbers | Recommended |
| Customer ID | A non PII value that can identify a unique user in a client's CRM. Examples: CRM id, user's login. The result that is passed to the tag must not be sent in plain value, it needs to be encrypted (MD5 or SHA256) | 49168a5c8493ec2c0bf489821c21fc3b | String | Recommended |
| Visitor ID | A unique Id that is consistent across multiple<br>sessions for an unauthenticated user. Example: First-party cookie id | 53e20ea700424f7bbdd793b02abcb5d7 | String | Recommended |
| Zip Code | User's shipping address zip code. | 12345 | String | Recommended |
| Product ID | Unique ID of the product | a123 String Yes | String | Required |
| Price | Unit price of the product | 20 | Double | Required |
| Quantity | The number of a specific item that the consumer added to the cart | 2 | Integer | Required |
| `YOUR_PARTNER_ID` | Partner Id is a unique ID that can be found in your Commerce Growth Url. | [https://marketing.criteo.com/technical-setup/assets-tags/implementation?advertiserId=93844&partnerId=**101269**](https://marketing.criteo.com/technical-setup/assets-tags/implementation?advertiserId=93844&partnerId=101269) | String | Required |

This path ends here.

<a id="step-868652"></a>

## Sales tag

```javascript
<!-- Criteo Sales Tag -->
<script type="text/javascript">
    window.criteo_q = window.criteo_q || [];   
    var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
    window.criteo_q.push(     
        { event: "setAccount", account: YOUR_PARTNER_ID},     
        { event: "setEmail", email: "##Email Address##", hash_method: "##Hash Method##" },     
        { event: "setSiteType", type: deviceType},     
        { event: "setCustomerId", id: "##Customer Id##" },     
        { event: "setRetailerVisitorId", id: "##Visitor Id##"},     
        { event: "setZipcode", zipcode: "##Zip Code##" },     
        { event: "trackTransaction",       
            id: "##Transaction ID##",       
            new_customer: ##New Customer##,       
            deduplication: ##Deduplication##,       
            item: [        
                {id: "##Product Id##", price: "##Price##", quantity: "##Quantity##" }        
                /* add a line for each additional line in the basket */    
            ]}   
        );
</script>
<!-- END Criteo Sales Tag -->
```

This tag records the conversions that happened on-site. This tag should fire for ALL conversion events regardless of attribution.

Please add this code snippet to the `<head>` section of the Thank you page.  
  
For full information on how to manage your website policy, click [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075).  
It only needs to be triggered once per page, but calling the script multiple times on a single page will not break anything.  
Dynamically replace fields surrounded by ## and ## with values, ensuring that all # symbols are removed.  
  
See the table for more info on the fields.

> **Tip:** **Tip:** For optimum viewing experience, please expand the table by clicking the expand icon on the top-right corner of the table.

| FIELDS | OVERVIEW | EXAMPLE | SYNTAX | REQUIRED |
| --- | --- | --- | --- | --- |
| Email Address | Email address in plain text (if allowed by the law in your country), sha256 hashed email address, or MD5 hashed email address  <br>  <br>For more information, click [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075). | 79054025255fbla26e4bc422aef54eb4... | \- Plain text<br>Email<br>\- Sha256 and md5 hashed emails | Required |
| Hash Method | The hashing method used for the email.<br>\- Doesn't need to be included for plain text<br>emails<br>\- For sha265 hashed emails: "sha256"<br>\- For md5 hashed emails: 'md5" | sha256 | String | Required |
| Phone number | Phone number in SHA256 hashed format or in plain text. Depending on the choice of format, you should use the appropriate event: setSha256HashedPhoneNumber or setPhoneNumber, respectively. Check [here](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,4106561) for more information. | fda66831d0cb0eb4bffb21bc795308d69921c211c57be0ae15702071e3b9e989 | \-Plain text phone numbers -SHA256 hashed phone numbers | Recommended |
| Zip Code | User's shipping address zip code. | 12345 | String | Recommended |
| Transaction ID | Confirmation or Order # | 7654322 | Integer, Unique ID | Required |
| Product ID | Unique ID of the product | a123 String Yes | String | Required |
| Price | Unit price of the product | 20 | Double | Required |
| Quantity | The number of a specific item that the consumer added to the cart | 2 | Integer | Required |

This path ends here.

<a id="step-5039946"></a>

## Lead tag

```javascript
<!-- Criteo Lead Conversion Tag -->
<script type="text/javascript">
  window.criteo_q = window.criteo_q || [];
  var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
  window.criteo_q.push(
    { event: "setAccount", account: ##PartnerID## },
    { event: "setSiteType", type: deviceType},
    { event: "lead", type: "##Lead Type##", value: "##Value##" }
  );
</script>
<!-- END Criteo Lead Conversion Tag -->
```

The Lead tag is the final and most critical event in the measurement suite. It records a completed lead action, such as a form submission or account registration, by firing on the Lead Confirmation or Thank You page. This tag should fire for all conversion events, regardless of attribution, so that every lead can be measured and valued.

-   **Purpose**: provides the definitive signal that a lead has been captured.
    
-   **Impact**: enables accurate campaign reporting, attribution, and ROI measurement, while also feeding back into optimization to increase the likelihood of acquiring more high-quality leads.
    
-   **When to use it**: required for all lead campaigns.
    

  
Please use the following pre-defined Lead Types when setting up campaigns:

| **Event Type** | **Description** |
| --- | --- |
| Signup | User creates an account to register and access a service or platform |
| Subscribe | User starts a paid subscription for a product or service that you offer |
| SubmitForm | User fills out an inquiry or quote form |
| Contact | User clicks or submits a phone, message, email , or chat request |
| StartTrial | User signs up for a free trial |
| Schedule | User books a meeting, visit, or viewing |
| ClickOut | User clicks and redirects to an external site |
| Other | An event that doesn’t fall into one of the other event types. Always use the label “Other”. Do not create variants like Custom2 and Custom\_X. |

> **Tip:** **Note:** You need to replace ##Lead Type## with one of the above values.

Next: [Common parameters](#step-5039945)

<a id="step-5039945"></a>

## Common parameters

```javascript
<!-- Criteo COMMON PARAMETERS Tag --> 
<script type="text/javascript">   
window.criteo_q = window.criteo_q || [];   
var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";   
window.criteo_q.push(     
  { event: "setAccount", account: YOUR_PARTNER_ID},     
  { event: "setEmail", email: "##Email Address##", hash_method: "##Hash Method##" },  
  { event: "setSha256HashedPhoneNumber", phone_number: "##Hashed phone number##" },
  { event: 'setPhoneNumber', phone_number: '##Plain text phone number##' },   
  { event: "setSiteType", type: deviceType},     
  { event: "setCustomerId", id: "##Customer Id##" },     
  { event: "setRetailerVisitorId", id: "##Visitor Id##"},     
  { event: "setZipcode", zipcode: "##Zip Code##" },     
  { event: "##event name##" }   ); 
</script>  <!-- END Criteo COMMON PARAMETERS Tag -->
```

Below is the list of common event parameters that are supported and can be used on all tag events. The code snippets show how these parameters are added to each event type. 

| FIELD | DESCRIPTION | EXAMPLE | SYNTAX | REQUIRED |
| --- | --- | --- | --- | --- |
| Partner Id | A numerical value that identifies your website account on the Criteo network. | 12345678 | Integer | Yes |
| Email Address | Contains either:  <br>-   SHA256 hashed email (in line with industry standards)<br>    <br>-   MD5 hashed email<br>    <br>-   Plain text (if allowed by the law in your country) | 79054025255fb1a26e4bc422aef54eb4... | String (trimmed and lower-cased, encoded in UTF-8)<br>-   [Plain text emails](https://help.criteo.com/kb/guide/en/pass-hashed-emails-through-cross-device-event-cYHxCUc1qv/Steps/1977811,1977816)<br>    <br>-   [Sha256 and md5 hashed emails](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,887075,1948825) | Recommended |
| Hash Method | The hashing method used for the email. Please put "none" for plaintext emails and "sha256" for sha265 hashed emails. | sha256 | String | Recommended |
| User Phone Number - Plain Text | User Phone Number - Plain Text | +33140402290 | String. Trimmed [E.164](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,4106561,4106562) format. Number starts with "+" sign, includes the country code and there is no leading 0. | No |
| User Phone Number - SHA256 | User Phone Number - SHA256 | f80a807618cce09f81574aad74a3efe06c27c200d50873754fd287c9f15fea68 | String. Trimmed [E.164](https://help.criteo.com/kb/guide/en/criteo-onetag-advanced-settings-M2TiX6m90K/Steps/886908,4106561,4106563) format including the country code, without the leading "+" sign and SHA256\-hashed. | Recommended |
| Customer ID | A non PII value that can identify a unique user in a client's CRM. Examples: CRM id, user's login. The result that is passed to the tag must not be sent in plain value, it needs to be encrypted (MD5 or SHA256) | 49f68a5c8493ec2c0bf489821c21fc3b | String | Recommended |
| Visitor ID | A unique Id that is consistent across multiple sessions for an unauthenticated user. Example: First party cookie id | 53e20ea700424f7bbdd793b02abcb5d7 | String | No |
| Zipcode | Zip code of the shipping address. Value is hashed before storing in our database. We do not store any PII and are compliant with all local regulations. | 12345 | String | Recommended |

This path ends here.
