---
title: '如何将我的线下销售数据传递给Criteo？'
description: '有3种方式可以将您的线下销售数据传递给Criteo。 请访问更新后的支持页面以获取更多详细信息： 平面文件目录集成 线下销售数据加载API 数据合作伙伴集成。…'
language: zh
guide: Yf95KPKbjB
updated: 2025-08-25T13:16:14Z
canonical: https://help.criteo.com/kb/guide/zh/criteo-Yf95KPKbjB/Steps/775624
alternates:
  de: https://help.criteo.com/kb/guide/de/wie-kann-ich-die-daten-zu-meinen-offline-sales-an-criteo-ubertragen-Yf95KPKbjB.md
  en: https://help.criteo.com/kb/guide/en/how-can-i-pass-my-offline-sales-data-to-criteo-Yf95KPKbjB.md
  es: https://help.criteo.com/kb/guide/es/como-puedo-compartir-mis-datos-de-ventas-offline-con-criteo-Yf95KPKbjB.md
  fr: https://help.criteo.com/kb/guide/fr/comment-transmettre-mes-donnees-de-ventes-hors-ligne-a-criteo-Yf95KPKbjB.md
  it: https://help.criteo.com/kb/guide/it/come-posso-trasmettere-le-mie-vendite-offline-a-criteo-Yf95KPKbjB.md
  ja: https://help.criteo.com/kb/guide/ja/criteo-Yf95KPKbjB.md
  ko: https://help.criteo.com/kb/guide/ko/-Yf95KPKbjB.md
  pt: https://help.criteo.com/kb/guide/pt/como-eu-posso-passar-meus-dados-de-vendas-offline-para-a-criteo-Yf95KPKbjB.md
---

> Index of this knowledge base: https://help.criteo.com/llms.txt
>
> Interactive version: https://help.criteo.com/kb/guide/zh/criteo-Yf95KPKbjB/Steps/775624

# 如何将我的线下销售数据传递给Criteo？

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

## 如何将我的线下销售数据传递给Criteo？

有3种方式可以将您的线下销售数据传递给Criteo。  请访问更新后的支持页面以获取更多详细信息：

1.  **平面文件目录集成**
    
2.  **线下销售数据加载API**
    
3.  **数据合作伙伴集成。** 我们的战略合作伙伴关系使您能够利用直接集成，轻松地通过您的数据合作伙伴（例如CRM和营销软件提供商、数字收据和忠诚度提供商、集成平台和销售点提供商）向我们传递您的线下销售数据。
    

  
线下销售数据文件必须包括：

-   购物者ID（以加密电子邮箱形式提供）
    
-   交易数据（即价格和数量）
    
-   产品级别数据（即产品ID）
    
-   商店ID
    
-   时间戳（精确到分钟）
    

  
为了开展商店转化广告活动，您还需要：

-   传递您的商店目录以在广告中提供相关的商店详情
    
-   使用Criteo OneTag采集线上商店意图
    
-   传递您的本地库存_（可选）_以筛选每家商店哪些产品有货
    

 _请与您的Criteo客户策略师联系以了解更多信息。_

- If "线下销售数据加载——平面文件数据源集成": [线下销售数据加载——平面文件数据源集成](#step-914151)
- If "线下销售数据加载——API集成": [线下销售数据加载——API集成](#step-914149)
- If "商店目录": [商店目录](#step-914152)
- If "使用Criteo OneTag采集线上商店意图": [使用Criteo OneTag采集线上商店意图](#step-914153)
- If "使用本地库存数据源": [使用本地库存数据源](#step-914150)
- If "Activate the Criteo Offline Sales native Snowflake app": [Activate the Criteo Offline Sales native Snowflake app](#step-4469234)

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

## 线下销售数据加载——平面文件数据源集成

<a id="step-8g1zFYawMy-775585"></a>

## 线下销售数据加载——平面文件数据源集成

| 类型 | 数据源示例 | 格式 | 更新 | 位置 |
| --- | --- | --- | --- | --- |
| 每行一个event\_item\_id。<br>给定交易的每一行，有相同的event\_id。 | 附件1中的数据源示例 | CSV/TSV | 每日（最长 48小时） | Criteo (S)FTP/客户端 (S)FTP |
| 每行一个event\_id。<br>包括一个event\_item\_id列，其中包含用竖线（I）分隔开的产品ID列表。 | 附件2中的数据源示例 | CSV/TSV | 每日（最长 48小时） | Criteo<br>(S)FTP/客户端 (S)FTP |

如果您希望通过平面文件数据源集成分享您的数据，请使用TSV或CSV数据源格式。

CSV格式基于逗号分隔值。 标头必须在文件的第一行声明，建议标头以小写形式提供，不带任何空格。

文件可以上传到Criteo FTP或SFTP，也可由Criteo从您自己的FTP或SFTP下载。 与您的客户策略师联系，商定最适合您的集成方法。 

文件中的每一行均应是一个不同的产品，包含其单价和数量。  包含多种产品的交易应分成多行，使用相同的event\_id。  Criteo将根据event\_id对产品进行分组并计算总价。

请注意，Criteo也可以接受每笔交易一行，在此情况下，应在“event\_item\_id”列内用竖线（|）分隔开多个产品数据。

建议您每日至少安排一次导入，Criteo可以每小时处理一次平面文件。  最长提取延迟为48小时。

请参见上表中有关您上传的平面文件的数据规范，其中显示了必填列和选填列。

- If "必填字段": [必填字段](#step-8g1zFYawMy-891116)
- If "选填字段": [选填字段](#step-8g1zFYawMy-891115)

<a id="step-8g1zFYawMy-891116"></a>

## 必填字段

- If "user\_email": [user\_email](#step-8g1zFYawMy-891527)
- If "商店目录": [商店目录](#step-8g1zFYawMy-912786)
- If "event\_id": [event\_id](#step-8g1zFYawMy-891539)
- If "event\_item\_quantity": [event\_item\_quantity](#step-8g1zFYawMy-891533)
- If "event\_item\_id": [event\_item\_id](#step-8g1zFYawMy-891541)
- If "event\_currency": [event\_currency](#step-8g1zFYawMy-891532)
- If "event\_item\_price": [event\_item\_price](#step-8g1zFYawMy-891538)
- If "event\_timestamp": [event\_timestamp](#step-8g1zFYawMy-891534)

<a id="step-8g1zFYawMy-891115"></a>

## 选填字段

- If "user\_crmid": [user\_crmid](#step-8g1zFYawMy-891535)
- If "商店目录": [商店目录](#step-8g1zFYawMy-912786)
- If "event\_item\_alternate\_id": [event\_item\_alternate\_id](#step-8g1zFYawMy-891531)
- If "event\_value": [event\_value](#step-8g1zFYawMy-891526)
- If "event\_item\_id\_gtin": [event\_item\_id\_gtin](#step-8g1zFYawMy-891536)
- If "event\_item\_category": [event\_item\_category](#step-8g1zFYawMy-891540)
- If "event\_item\_brand": [event\_item\_brand](#step-8g1zFYawMy-891529)
- If "event\_item\_id\_mpn": [event\_item\_id\_mpn](#step-8g1zFYawMy-891537)
- If "event\_custom\_data": [event\_custom\_data](#step-8g1zFYawMy-891530)
- If "store\_id": [store\_id](#step-8g1zFYawMy-4979060)

<a id="step-8g1zFYawMy-891527"></a>

## user\_email

购物者的电子邮箱。

电子邮箱将以MD5的SHA256形式被提取到Criteo的身份图中。 如果您无法提供此种形式的电子邮箱，则您可以提供MD5加密电子邮箱，Criteo会在提取之前对其进行即时加密处理。

  
在进行加密处理之前，所有用户的电子邮箱必须进行以下处理：

-   删除首尾空格，即必须删除用户电子邮箱前后的所有空格
-   转换为小写
-   以UTF-8编码

  

**类型：**字符串

**示例：****MD5：**e13743a7f1db7f4246badd6fd6ff54ff

**MD5的SHA256：**000e3171a5110c35c69d060112bd0ba55d9631c7c2ec93f1840e4570095b263a

This path ends here.

<a id="step-8g1zFYawMy-912786"></a>

## 商店目录

<a id="step-SHaqqKX3FY-775587"></a>

## 商店目录

**1 - 我为什么要分享此数据？**

为了开展商店转化广告活动，我们需要了解您的商店位置以及购物者需要访问的关键信息。

我们将利用这些数据来改善广告活动定向，并向购物者展示最相关的广告。 

**2 - 格式概述和频率**

-   我们接受CSV或TSV（逗号分隔值或制表符分隔值）文件
    
-   标头必须在文件的第一行声明，并且必须以小写形式提供，不带任何空格
    
-   文件的每一行均应为一家不同的商店
    
-   文件可以上传到Criteo FTP或SFTP，也可由Criteo从您自己的FTP、SFTP或http(s) 服务器下载。 与您的Criteo客户策略师联系，商定最适合您的集成方法
    
-   我们可以支持每日文件更新。 但是，如果信息不经常更改，只需在我们需要提取新文件时告知我们即可
    

  
  

**3 - 必填字段列表**

- If "商店信息": [商店信息](#step-SHaqqKX3FY-887843)
- If "位置数据": [位置数据](#step-SHaqqKX3FY-887842)
- If "营业时间": [营业时间](#step-SHaqqKX3FY-887845)
- If "附加信息": [附加信息](#step-SHaqqKX3FY-887840)

<a id="step-SHaqqKX3FY-887843"></a>

## 商店信息

- If "store\_id": [store\_id](#step-SHaqqKX3FY-887846)
- If "store\_name": [store\_name](#step-SHaqqKX3FY-887841)
- If "store\_url": [store\_url](#step-SHaqqKX3FY-887844)

<a id="step-SHaqqKX3FY-887842"></a>

## 位置数据

- If "地址": [地址](#step-SHaqqKX3FY-887940)
- If "邮编": [邮编](#step-SHaqqKX3FY-887924)
- If "城市": [城市](#step-SHaqqKX3FY-887927)
- If "Location\_lat": [Location\_lat](#step-SHaqqKX3FY-887932)
- If "Location\_long": [Location\_long](#step-SHaqqKX3FY-887939)
- If "Primary\_phone": [Primary\_phone](#step-SHaqqKX3FY-887941)

<a id="step-SHaqqKX3FY-887845"></a>

## 营业时间

- If "Monday\_hours": [Monday\_hours](#step-SHaqqKX3FY-887933)
- If "Tuesday\_hours": [Tuesday\_hours](#step-SHaqqKX3FY-887926)
- If "Wednesday\_hours": [Wednesday\_hours](#step-SHaqqKX3FY-887938)
- If "Thursday\_hours": [Thursday\_hours](#step-SHaqqKX3FY-887936)
- If "Friday\_hours": [Friday\_hours](#step-SHaqqKX3FY-887929)
- If "Saturday\_hours": [Saturday\_hours](#step-SHaqqKX3FY-887928)
- If "Sunday\_hours": [Sunday\_hours](#step-SHaqqKX3FY-887934)
- If "Special\_hours": [Special\_hours](#step-SHaqqKX3FY-887931)

<a id="step-SHaqqKX3FY-887840"></a>

## 附加信息

- If "服务": [服务](#step-SHaqqKX3FY-887930)
- If "Store\_picture": [Store\_picture](#step-SHaqqKX3FY-887925)
- If "Custom\_label1": [Custom\_label1](#step-SHaqqKX3FY-887935)
- If "is\_closed": [is\_closed](#step-SHaqqKX3FY-887937)

<a id="step-SHaqqKX3FY-887846"></a>

## store\_id

商店的ID， 必须与您在[线下销售数据源](https://help.criteo.com/kb/guide/en/how-can-i-pass-my-offline-sales-data-to-criteo-Yf95KPKbjB/Steps/775624)中发送的值相匹配。

**值：**字符串。

**示例：**1so56

This path ends here.

<a id="step-SHaqqKX3FY-887841"></a>

## store\_name

商店的名称。 请注意，此值可用于在创意中显示。

**值：**字符串。

**示例：**洛克菲勒中心

This path ends here.

<a id="step-SHaqqKX3FY-887844"></a>

## store\_url

您网站上专用商店页面的URL。

请注意，此URL可以在创意中用于重定向到有关特定商店的更多信息。  如果您的网站上没有专用商店页面，我们可以默认使用给定的URL。

**值：**URL

**示例：**http://mysite.com/ stores?store=r23

This path ends here.

<a id="step-SHaqqKX3FY-887940"></a>

## 地址

商店地址的第一行，不包括邮编、城市、地区/州和国家。

请注意，此值可用于在创意中显示。

**值：**字符串

**示例：**第四大道514号

This path ends here.

<a id="step-SHaqqKX3FY-887924"></a>

## 邮编

商店的邮编。

请注意，此值可用于在创意中显示。 

**值：**字符串

**示例：**94120

This path ends here.

<a id="step-SHaqqKX3FY-887927"></a>

## 城市

商店所在的城市。

**值：**字符串

**示例：**旧金山

This path ends here.

<a id="step-SHaqqKX3FY-887932"></a>

## Location\_lat

商店的纬度GPS坐标。

请遵循[WGS84 标准](http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf)。

**值：**十进制

**示例：**47.908126

This path ends here.

<a id="step-SHaqqKX3FY-887939"></a>

## Location\_long

商店的经度GPS坐标。

请遵循[WGS84 标准](http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf)。

**值：**十进制

**示例：**1.905492

This path ends here.

<a id="step-SHaqqKX3FY-887941"></a>

## Primary\_phone

商店的电话号码。

_此数据输入为选填字段。_

**值：**字符串

**示例：**(765) 876-7211

This path ends here.

<a id="step-SHaqqKX3FY-887933"></a>

## Monday\_hours

星期一商店的营业时间。

-   请按以下格式提供数据：HH:mm-HH:mm|HH:mm-HH:mm
-   当一天之中有休息时间时，使用“|”分隔开上午和下午的营业时间。
-   如果商店当天不营业，请将此字段留空或使用“x”。

**值：**字符串

**示例：**09:00-12:00|13:00-20:00

This path ends here.

<a id="step-SHaqqKX3FY-887926"></a>

## Tuesday\_hours

星期二商店的营业时间。

-   请按以下格式提供数据：HH:mm-HH:mm|HH:mm-HH:mm
-   当一天之中有休息时间时，使用“|”分隔开上午和下午的营业时间。
-   如果商店当天不营业，请将此字段留空或使用“x”。

**值：**字符串

**示例：**09:00-18:00

This path ends here.

<a id="step-SHaqqKX3FY-887938"></a>

## Wednesday\_hours

星期三商店的营业时间。

-   请按以下格式提供数据：HH:mm-HH:mm|HH:mm-HH:mm
-   当一天之中有休息时间时，使用“|”分隔开上午和下午的营业时间。
-   如果商店当天不营业，请将此字段留空或使用“x”。

**值：**字符串

**示例：**09:00-18:00

This path ends here.

<a id="step-SHaqqKX3FY-887936"></a>

## Thursday\_hours

星期四商店的营业时间。

-   请按以下格式提供数据：HH:mm-HH:mm|HH:mm-HH:mm
-   当一天之中有休息时间时，使用“|”分隔开上午和下午的营业时间。
-   如果商店当天不营业，请将此字段留空或使用“x”。

**值：**字符串

**示例：**09:00-18:00

This path ends here.

<a id="step-SHaqqKX3FY-887929"></a>

## Friday\_hours

星期五商店的营业时间。

-   请按以下格式提供数据：HH:mm-HH:mm|HH:mm-HH:mm
-   当一天之中有休息时间时，使用“|”分隔开上午和下午的营业时间。
-   如果商店当天不营业，请将此字段留空或使用“x”。

**值：**字符串

**示例：**09:00-18:00

This path ends here.

<a id="step-SHaqqKX3FY-887928"></a>

## Saturday\_hours

星期六商店的营业时间。

-   请按以下格式提供数据：HH:mm-HH:mm|HH:mm-HH:mm
    
-   当一天之中有休息时间时，使用“|”分隔开上午和下午的营业时间。
    
-   如果商店当天不营业，请将此字段留空或使用“x”。
    

**值：**字符串

**示例：**09:00-18:00

This path ends here.

<a id="step-SHaqqKX3FY-887934"></a>

## Sunday\_hours

星期天商店的营业时间。

-   请按以下格式提供数据：HH:mm-HH:mm|HH:mm-HH:mm
-   当一天之中有休息时间时，使用“|”分隔开上午和下午的营业时间。
-   如果商店当天不营业，请将此字段留空或使用“x”。

**值：**字符串

**示例：**09:00-18:00

This path ends here.

<a id="step-SHaqqKX3FY-887931"></a>

## Special\_hours

您的商店在特定日期的特殊营业时间。

-   请按以下格式提供数据：yyyy-MM-dd:HH:mm-HH:mm|HH:mm-HH:mm;yyyy-MM-dd
-   当一天之中有休息时间时，使用“|”分隔开上午和下午的营业时间。
-   使用“x”表示商店在特定日期关闭。

**值：**字符串

**示例：**2016-12-24:08:00-13 :00|14:00-20:00;2016-12-25:x;2016-12-26:08:00-18:00

This path ends here.

<a id="step-SHaqqKX3FY-887930"></a>

## 服务

此商店提供的服务列表。 值必须用竖线（|）分隔开。

_此数据输入为选填字段。_

**值：**字符串

**例如：**宠物美容|ATM|包邮

This path ends here.

<a id="step-SHaqqKX3FY-887925"></a>

## Store\_picture

商店主图片的URL。

_此数据输入为选填字段。_

**值：**URL

**示例：**http://storepicture123c.jpg

This path ends here.

<a id="step-SHaqqKX3FY-887935"></a>

## Custom\_label1

您想要专门针对此商店推送的任何简短营销信息。

_此数据输入为选填字段。 您可以添加多条营销信息，在您的数据源中添加额外的custom\_label行即可实现。_

**值：**字符串

**示例：**每星期二免费瑜伽课

This path ends here.

<a id="step-SHaqqKX3FY-887937"></a>

## is\_closed

在某些情况下（例如在新冠肺炎疫情封控期间），部分商店可能会暂时关闭，因此在计算受众或向用户推荐商店时，您可能不希望利用它们。 在此情况下，您可以在数据源使用is\_closed字段表明某一商店已关闭。 或者，您可以在导入之前从数据源中删除已关闭的商店。 它们不会从我们的数据库中删除，但会被标记为已关闭。

**值：**布尔值

**示例：**1

This path ends here.

_End of the embedded guide "商店目录"._

<a id="step-8g1zFYawMy-891539"></a>

## event\_id

交易ID，  将用于重复数据删除和除错，以及对来自不同行的产品项目数据进行分组。  
  

**类型：**字符串

**示例：**tr\_1234567a

This path ends here.

<a id="step-8g1zFYawMy-891533"></a>

## event\_item\_quantity

购买的产品数量。  
  

**类型：**整数

**示例：**2

This path ends here.

<a id="step-8g1zFYawMy-891541"></a>

## event\_item\_id

购买的每种产品的唯一标识符，  必须与您的线上产品数据源相匹配。  
  

**类型：**字符串

**示例：**pdct\_1234

This path ends here.

<a id="step-8g1zFYawMy-891532"></a>

## event\_currency

交易的货币， 必须遵循3字母[ISO 4217代码](https://en.wikipedia.org/wiki/ISO_4217)。  
  

**类型：**字符串

**示例：**欧元

This path ends here.

<a id="step-8g1zFYawMy-891538"></a>

## event\_item\_price

购买的每种产品的单价。 必须有2个小数点，并且小数点分隔符必须是一个点。  
  

**类型：**浮动

**示例：**43.99

This path ends here.

<a id="step-8g1zFYawMy-891534"></a>

## event\_timestamp

应包括时间戳，否则交易时间将被记录为提取时间。  为了确保最佳精确度，时间戳应精确到分钟。

时间戳必须遵循ISO 8601标准，使用UTC时区时带有明确的时区指示符“Z”。  
  

**类型：**时间戳。 

UTC格式：\[YYYY\]-\[MM\]-\[DD\]T\[hh\]:\[mm\]:\[ss\]Z

非UTC格式：\[YYYY\]-\[MM\]-\[DD\]T\[hh\]:\[mm\]:\[ss\]±\[hh:mm\]

**示例（UTC+1）：**2017-06-02T13:25:15+01:00

This path ends here.

<a id="step-8g1zFYawMy-891535"></a>

## user\_crmid

购物者的CRM ID。

**类型：**字符串

**示例：**00Q7000fAJuO

This path ends here.

<a id="step-8g1zFYawMy-891531"></a>

## event\_item\_alternate\_id

在产品有多个标识符的情况下，购买的每种产品的额外唯一标识符。

**类型：**字符串

**示例：**pdct\_1234

This path ends here.

<a id="step-8g1zFYawMy-891526"></a>

## event\_value

总交易的价值。 必须有2个小数点，并且小数点分隔符必须是一个点。

**类型：**浮动

**示例：**75.00

This path ends here.

<a id="step-8g1zFYawMy-891536"></a>

## event\_item\_id\_gtin

全球贸易项目编号（GTIN）。

**类型：**字符串

**示例：**00045678900012

This path ends here.

<a id="step-8g1zFYawMy-891540"></a>

## event\_item\_category

购买的每种产品的类别。

**类型：**字符串

**示例：**鞋类

This path ends here.

<a id="step-8g1zFYawMy-891529"></a>

## event\_item\_brand

购买的每种产品的品牌。

**类型：**字符串

**示例：**Nike

This path ends here.

<a id="step-8g1zFYawMy-891537"></a>

## event\_item\_id\_mpn

购买的每种产品的MPN。

MPN（制造商零件号）是品牌用来标识其产品的唯一标识符。

**类型：**字符串

**示例：**000123456

This path ends here.

<a id="step-8g1zFYawMy-891530"></a>

## event\_custom\_data

您希望提供的有关此次销售的任何其他信息。 

  

**类型**: 事件相关 

  
**示例**：取决于事件

This path ends here.

<a id="step-8g1zFYawMy-4979060"></a>

## store\_id

The ID of the store in which the sale occurred.

We also highly recommend that you provide us with a Store Directory feed to enable us to effectively drive shoppers to your stores and improve campaign targeting.  

**Type:** Integer

**Example:** 75020

Next: [Store Directory](#step-8g1zFYawMy-4979061)

<a id="step-8g1zFYawMy-4979061"></a>

## Store Directory

See [商店目录](#step-SHaqqKX3FY-775587) above.

This path ends here.

_End of the embedded guide "线下销售数据加载——平面文件数据源集成"._

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

## 线下销售数据加载——API集成

<a id="step-ssFLphogRs-775602"></a>

## Offline sales onboarding - API integration

Integration through Criteo's offline sales onboarding API offers an automated way to upload your offline sales data, and means sales can be ingested into Criteo’s identity graph in real-time.

The offline sales onboarding API is a writing REST API which uses a POST method with JSON Request body.  An example of the full JSON request body can be found [here](https://jsfiddle.net/0mjkptoL/1/).

Please see below the set of transaction data parameters that must be provided in the JSON Request body in order to pass your offline sales data to the Criteo Offline API. 

To request access to the offline sales onboarding API endpoint, please get in touch with your Criteo Account Strategist.

Next: [1.1 - account data](#step-ssFLphogRs-910085)

<a id="step-ssFLphogRs-910085"></a>

## 1.1 - account data

Next: [2.1 - id data](#step-ssFLphogRs-910086)

<a id="step-ssFLphogRs-910086"></a>

## 2.1 - id data

Criteo uses hashed email as the identifier parameter. 

Emails will be ingested into Criteo’s identity graph as SHA256 of an MD5. If you are unable to provide emails in this format you can provide either raw or MD5 encrypted emails, which will be hashed on the fly by Criteo before being ingested.

Next: [3.1 - events\[ \] data](#step-ssFLphogRs-910087)

<a id="step-ssFLphogRs-910087"></a>

## 3.1 - events\[ \] data

Please find below the event parameters that must be pushed to Criteo as an array.  Each event is a JSON object with a predefined parameter.

This path ends here.

_End of the embedded guide "Offline sales onboarding - API integration"._

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

## 商店目录

See [商店目录](#step-SHaqqKX3FY-775587) above.

This path ends here.

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

## 使用Criteo OneTag采集线上商店意图

<a id="step-qRtjqWgKzF-775618"></a>

## Capture online store intent with Criteo OneTag

**Overview**

There are several events or pages on your website which can provide useful physical store intent signals, which through Criteo OneTag, we can use to enhance performance of your store campaigns. 

Please see below the different store intent signals that you are likely to have available on your website, along with detailed configuration of Criteo OneTag to start tracking these events.  

We strongly advise that you implement all scenarios that are relevant to your site to maximize the performance of your store campaigns.

**1.1 - 'Recommended' or 'Favorite' Store** 

A 'recommended' store provided by an algorithm based on a shopper's location (where permission has been granted), or a 'favorite' store specifically registered by the shopper, provide strong intent signals of the physical store they prefer to visit.

If you have these capabilities on your website, these events should be added in all events across your site:

-   Homepage event
    
-   Product page event
    
-   Search page event
    
-   Basket page event
    
-   Transaction conclusion page event
    
-   Search page event
    

NB: If both 'recommended' and 'favorite' store are available, always prefer the 'favorite' store.

1.1.1 **Script for 'recommended' or 'favorite' store events**

`<script type="text/javascript" src="//dynamic.criteo.com/js/ld/ld.js?a=YOUR_PARTNER_ID" async="true"></script>  <script type="text/javascript">    window.criteo_q = window.criteo_q || [];    window.criteo_q.push(      { event: "setAccount", account: YOUR UNIQUE ACCOUNT ID },      { event: "setSiteType", type: "m FOR MOBILE OR t FOR TABLET OR d FOR DESKTOP" },      { event: "setEmail", email: "TRIMMED AND LOWERCASE USER EMAIL ADDRESS" },               { event: "viewHome"},      { event: "setZipcode", zipcode: "STORE ZIPCODE" },      { event: "setStore", store_id: "STORE ID" }    );  </script>`

   

2.1 **Store Locator main page or search page**

There are several formats of Store Locator pages that you may have on your site:

-   Store Locator main page
    
-   Store Locator search page
    
-   Store Locator listing page
    
-   Store Locator search result page
    

Please see below the events that need to be added to these pages.

2.1.1 **Script for Store Locator main page or search page**

Whenever (and only when) a shopper accesses the Store Locator main page or search page the following event should be added to the OneTag:

`<script type="text/javascript" src="//dynamic.criteo.com/js/ld/ld.js?a=YOUR_PARTNER_ID" async="true"></script>  <script type="text/javascript">    window.criteo_q = window.criteo_q || [];    window.criteo_q.push(      { event: "setAccount", account: YOUR UNIQUE ACCOUNT ID },      { event: "setSiteType", type: "m FOR MOBILE OR t FOR TABLET OR d FOR DESKTOP" },      { event: "setEmail", email: "TRIMMED AND LOWERCASE USER EMAIL ADDRESS" },      { event: "viewStore", user_segment: 18 }    );  </script>`

   

2.1.2 **Script for Store Locator listing or search result page**

If your Store Locator page provides a search functionality, then add the following event to the Criteo OneTag to pass us the result of the search operation by providing the store IDs in the store\_id array.

If the search criterion is a postal code, then include it in the zip\_code array.

`<script type="text/javascript" src="//dynamic.criteo.com/js/ld/ld.js?a=YOUR_PARTNER_ID" async="true"></script>  <script type="text/javascript">    window.criteo_q = window.criteo_q || [];    window.criteo_q.push(      { event: "setAccount", account: YOUR UNIQUE ACCOUNT ID },      { event: "setSiteType", type: "m FOR MOBILE OR t FOR TABLET OR d FOR DESKTOP" },      { event: "setEmail", email: "TRIMMED AND LOWERCASE USER EMAIL ADDRESS" },      { event: "viewStore", store_id: ["FIRST STORE ID", "SECOND STORE ID" /* add a Store ID for each store in the list */], zipcode: "SEARCH ZIPCODE", user_segment: 18}    );  </script>`

   

3.1 **Store detail page**

Whenever the detail page of a specific store is viewed, the event must be captured.

3.1.1 **Script for store detail page**

`<script type="text/javascript" src="//dynamic.criteo.com/js/ld/ld.js?a=YOUR_PARTNER_ID" async="true"></script>  <script type="text/javascript">    window.criteo_q = window.criteo_q || [];    window.criteo_q.push(      { event: "setAccount", account: YOUR UNIQUE ACCOUNT ID },      { event: "setSiteType", type: "m FOR MOBILE OR t FOR TABLET OR d FOR DESKTOP" },      { event: "setEmail", email: "TRIMMED AND LOWERCASE USER EMAIL ADDRESS" },      { event: "viewStore", store_id: "STORE ID", zipcode: "STORE ZIPCODE", user_segment: 18 }    );  </script>`   

NB: 'Zipcode' is the postal code of the specific store identified in the 'store\_id' field.

4.1 **Reserve a product in-store**

If your website has the capability to allow shoppers to reserve products in-store, without purchasing in advance, the following event must be defined inside the Criteo OneTag.

4.1.1 **Script for product reservation**

`<script type="text/javascript" src="//dynamic.criteo.com/js/ld/ld.js?a=YOUR_PARTNER_ID" async="true"></script>   <script type="text/javascript">     window.criteo_q = window.criteo_q || [];     window.criteo_q.push(               { event: "setAccount", account: YOUR UNIQUE ACCOUNT ID },               { event: "setSiteType", type: "m FOR MOBILE OR t FOR TABLET OR d FOR DESKTOP" },           { event: "setEmail", email: "TRIMMED AND LOWERCASE USER EMAIL ADDRESS" },      { event: "reserveInStore", item: [        { id: "FIRST PRODUCT ID", quantity: FIRST PRODUCT QUANTITY, price: "FIRST PRODUCT PRICE" },        { id: "SECOND PRODUCT ID", quantity: SECOND PRODUCT QUANTITY, price: "SECOND PRODUCT PRICE" },        /* add a line for each product to be reserved */],      zipcode: "STORE ZIPCODE", store_id: "STORE ID", user_segment: 18 }    );  </script>`

   

NB: 'Zipcode' is the postal code of the specific store identified in the 'store\_id' field.

5.1 **Click & Collect**

Where you have 'Click & Collect' functionality on your site, the 'trackTransaction' event in Criteo OneTag should be configured as below.

5.1.1 **Script for Click & Collect**

`<script type="text/javascript" src="//dynamic.criteo.com/js/ld/ld.js?a=YOUR_PARTNER_ID" async="true"></script>   <script type="text/javascript">     window.criteo_q = window.criteo_q || [];     window.criteo_q.push(               { event: "setAccount", account: YOUR UNIQUE ACCOUNT ID },               { event: "setSiteType", type: "m FOR MOBILE OR t FOR TABLET OR d FOR DESKTOP" },           { event: "setEmail", email: "TRIMMED AND LOWERCASE USER EMAIL ADDRESS" },      { event: "trackTransaction", id: "TRANSACTION ID", delivery: "store", store_id: "THE STORE ID", zipcode: "STORE ZIPCODE", user_segment: 18, item: [         { id: "FIRST PRODUCT ID",  price: FIRST PRODUCT UNIT PRICE,  quantity: FIRST PRODUCT QUANTITY },        { id: "SECOND PRODUCT ID", price: SECOND PRODUCT UNIT PRICE, quantity: SECOND PRODUCT QUANTITY }                                                                      /* add a line for each product in the user's basket */   ]});   </script>` 

  

NB: The 'delivery' parameter should be set to 'store'.  The 'zipcode' is the postal code of the specific store identified in the "store\_id" field.

6.1 Check availability in-store

The 'checkAvailability' event should be specified in the Criteo OneTag each time a user uses the 'check availability in store' functionality on your site. 

If the feature makes use of a search by postal code then you should specify the postal code in the 'zipcode' parameter and the IDs of the result of the search in the 'store\_ids' parameter.

6.1.1 **Script for 'check availability in-store'**

`<script type="text/javascript" src="//dynamic.criteo.com/js/ld/ld.js?a=YOUR_PARTNER_ID" async="true"></script>  <script type="text/javascript">     window.criteo_q = window.criteo_q || [];     window.criteo_q.push(               { event: "setAccount", account: YOUR UNIQUE ACCOUNT ID },               { event: "setSiteType", type: "m FOR MOBILE OR t FOR TABLET OR d FOR DESKTOP" },      { event: "setEmail", email: "TRIMMED AND LOWERCASE USER EMAIL ADDRESS" },      { event: "checkAvailability", item: {id: "PRODUCT ID"}, zipcode: "STORE ZIPCODE", store_id: ["FIRST STORE ID", "SECOND STORE ID" /* add a Store ID for each store */], user_segment: 18 }   );  </script>`

NB: 'Zipcode' is the postal code of the specific store identified in the 'store\_id' field.

7.1 **A note about the collection of zip codes**

All the zip codes collected by Criteo are manipulated and stored in respect of the GDPR and the general PII best practices.

This path ends here.

_End of the embedded guide "Capture online store intent with Criteo OneTag"._

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

## 使用本地库存数据源

<a id="step-zYwi3Leylx-775588"></a>

## 使用本地库存数据源

**1\. 我为什么要分享此数据？**

为了向您的购物者提供最佳体验，我们建议您在线下设置过程中向我们提供本地库存文件。  这向Criteo提供了您商店网络中的本地产品价格和供应情况，确保我们准确地将购物者引导到供应该产品的商店。

  

**2\. 格式概述和频率**

-   我们接受CSV或TSV（逗号分隔值或制表符分隔值）文件。
    
-   标头必须在文件的第一行声明，并且必须以小写形式提供，不带任何空格。
    
-   文件的每一行必须是store\_id和item\_id的不同组合。
    
-   文件可以上传到Criteo FTP或SFTP，也可由Criteo从您自己的FTP、SFTP或http(s) 服务器下载。  与您的Criteo客户策略师联系，商定最适合您的集成方法。
    
-   默认情况下，我们要求每日文件更新，但如果需要，可以提高更新频率，具体取决于文件大小。
    
-   必须完整提供所有文件数据源源更新（store\_id和item\_id），包括缺货产品的标记。
    
-   请注意：如果新文件不包含过去提供的store\_id和item\_id，则有关此store\_id和item\_id的信息将在24小时后丢失。
    
-   如果我们没有收到给定store\_id和item\_id的信息，则将视为该商品在该商店缺货。
    
-   如果store\_id和item\_id缺少价格，我们将视为有关产品缺货。
    
-   如果数据源中缺少store\_id和item\_id，我们将使用您主Criteo产品目录中相同item\_id的价格和供应情况。
    

  

  

**3\. 必填字段列表  
  
**

3.1.1 **store\_id**

商店的ID，

必须与您在线下销售数据源中发送的值相匹配。

**值：**字符串。  

**示例：**1so546

  

  

3.1.2 **item\_id**

产品的ID，

必须与您在线下销售数据源、Criteo OneTag和主Criteo产品数据源中发送的值相匹配。

**值：**字符串。

**示例：**p123tc

  

  

3.1.3 **数量**

商店有货的商品数量。

请注意：如果未提供产品的供应情况，我们将在数量 > 2时视为某商店供应有关产品。

**值：**整数。

**示例：**14

  

  

3.1.4 **价格**

这是制造商提供的产品建议零售价。

价格将以与您的网站相同的货币显示。  仅使用句点（.）作为小数点分隔符填充此字段的数字值，不使用千位分隔符。

**值：**浮动。

**示例：**1299.99

  

 3.1.5 **销售价格**

这是产品在商店内可供购买的价格。

价格将以与您的网站相同的货币显示。  仅使用句点（.）作为小数点分隔符填充此字段的数字值，不使用千位分隔符。  
**_此字段为选填字段_**

**值：**浮动。

**示例：**999.99

  

  

3.1.6 **供应情况**

这表明产品在指定store\_id是否有货。  
在此可以使用3个值：  
预订：商品可订购，但目前无法发货。  
有货：商品可订购以及发货。  
缺货：商品不可订购或发货。  
请注意：标有“缺货”的商品将从横幅中排除。  
**_此字段为选填字段_**

**值：**字符串。

**示例：**有货

- If "如何将我的线下销售数据传递给Criteo？": [如何将我的线下销售数据传递给Criteo？](#step-zYwi3Leylx-910811)
- If "产品目录规范": [产品目录规范](#step-zYwi3Leylx-910810)

<a id="step-zYwi3Leylx-910811"></a>

## 如何将我的线下销售数据传递给Criteo？

_Part of this guide is not public._

This path ends here.

<a id="step-zYwi3Leylx-910810"></a>

## 产品目录规范

_Part of this guide is not public._

This path ends here.

_End of the embedded guide "使用本地库存数据源"._

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

## Activate the Criteo Offline Sales native Snowflake app

[Video](https://content-enablement.wistia.com/medias/81q3t6ntsv)

> **Tip:** **Before you get started, ensure that:** 
>
> 1.  You reach out to a Criteo representative to activate this integration. 
>     
>
> 2.  You have the Criteo partner ID. 
>     
>
> 3.  You have the Account Admin Role assigned to you in Snowflake. 
>     
>
> 4.  You have the offline sales data table that includes Timestamp, Email address/ Hashed email, Transaction ID, Total purchase amount, Currency (optional) and a column with an array of products being purchased with this transaction that contains the Product Id, price and amount.

The Criteo Offline Sales app enables secure sharing of your offline sales data from your Snowflake environment directly into Commerce Growth. This allows you to connect offline sales with online behavior, supporting store attribution and campaign optimization.  

##### **Install the Criteo Offline Sales app**

1.  Open the Snowflake interface. 
    

2.  From the left navigation menu, go to **Data Products > Marketplace.** Then, search for **Criteo Offline Sales**. 
    
3.  Click **Get**.  
    
4.  When prompted, grant permission to access Criteo API endpoints and share data over SSL by clicking **Connect**.   
    

Your app installation is done.

Next: [Configure the Criteo Offline Sales app](#step-4469235)

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

## Configure the Criteo Offline Sales app

Once you have installed the app, you can configure it by following the steps below. 

1.  The first step is to enter your **Account Id** provided to you by a Criteo representative.   
    
2.  Next, you will be prompted to select and allow access to the table that keeps your offline sales data. Select the table and click **Save**.   
    
3.  For each column in the table, select the corresponding field in the database. Optionally, you can choose to provide access to Cortext AI for simplified table mapping. If you use AI mapping, a manual review is recommended to ensure accurate mapping.    
    
4.  The final step is to schedule the import to enable data change tracking and execute imports. Under the **Import** section, click **Enable data change tracking**. Once this is enabled, you will see the **Start Import** button. Your import will run successfully. 
    
5.  To see the import history and the time the latest import was running, navigate to the Dashboard section.

Next: [What happens next?](#step-4469238)

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

## What happens next?

Once the configuration is complete: 

-   All changes to the selected table will automatically sync with Criteo. 
    

-   Offline sales data will appear on the Criteo platform within minutes. 
    

-   This data will be incorporated into attribution reporting and will be available for targeting within Commerce Growth.

This path ends here.
