# 크리테오

### 크리테오 설정&#x20;

1. 고도몰 어드민 > 마케팅 > 크리테오 설정/관리 로 이동합니다.

2. 크리테오 설정을 "사용함" 으로 설정 합니다

<figure><img src="/files/OEBHZDfO9M3wRMC3FaIH" alt=""><figcaption></figcaption></figure>

3. 네이버 페이 구매전환 성과 측정을 사용하시려면 "사용함"으로 설정 합니다.

<figure><img src="/files/UT5KIsz1bA5Dxrt9U4VS" alt=""><figcaption></figcaption></figure>

&#x20;   \*N PAY 구매 버튼 클릭 시점에 구매전환 성과 측정이 진행되어 실제 구매 측정값과 상이할 수 있습니다

4. 서비스 적용 범위를 선택합니다.

<figure><img src="/files/pgMFEpUGjSxBZXM7o5GX" alt=""><figcaption></figcaption></figure>

5. 크리테오에서 전달 받은 광고ID를 입력 후 저장 을 눌러주세요.

<figure><img src="/files/FINYRDQ1jac5RztFhEr0" alt=""><figcaption></figcaption></figure>

6. 상품 DB URL을 크리테오에 전달해주세요.

<figure><img src="/files/q5uqf6H26bwu37731OIG" alt=""><figcaption></figcaption></figure>

크리테오 스크립트 직접 설정 안내

#### 크리테오 로더 스크립트 <a href="#undefined-3" id="undefined-3"></a>

* \<head>\</head>태그 등 모든 페이지에서 확인이 가능한 곳에 코드(스크립트)를 심습니다.
* YOUR\_PARTER\_ID 부분은 크리테오 혹은 대행사로부터 받은 p값을 입력 합니다.

Copy

```
<script
  type="text/javascript"
  src="//dynamic.criteo.com/js/ld/ld.js?a=YOUR_PARTNER_ID"
  async="true"
></script>
```

#### 메인페이지 태그 <a href="#undefined-4" id="undefined-4"></a>

* 메인페이지에 하기 코드(스크립트)를 심습니다

Copy

```
<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: "", hash_method: "sha256" },
    { event: "setZipcode", zipcode: "" },
    { event: "setSiteType", type: deviceType },
    { event: "viewHome" }
  );
</script>
```

#### 상세페이지 <a href="#undefined-5" id="undefined-5"></a>

* 상품상세페이지에 하기와 같이 스크립트를 적용 합니다.
* YOUR\_PARTER\_ID 부분은 크리테오 혹은 대행사로부터 받은 p값을 입력 합니다.

Copy

```
<script type="text/javascript">
  try {
    if (sb?.product) {
      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" }, // P값을 넣어주세요
        { event: "setEmail", email: "", hash_method: "sha256" },
        { event: "setZipcode", zipcode: "" },
        { event: "setSiteType", type: deviceType },
        { event: "viewItem", item: sb.product.baseInfo.productName }
      );
    }
  } catch (error) {
    console.error("Criteo Script has occurred: ", error);
  }
</script>
```

#### 장바구니 페이지 <a href="#undefined-6" id="undefined-6"></a>

* 장바구니페이지에 하기 스크립트를 적용 합니다.
  * 해당 문서에서는 viewCart를 addToCart 이벤트로 대처 합니다.
* YOUR\_PARTER\_ID 부분은 크리테오 혹은 대행사로부터 받은 p값을 입력 합니다.

Copy

```
<script type="text/javascript">
  try {
    const crItems = [];

    const {
      deliveryGroups = [],
      price: { buyAmt = 0 },
    } = sb.cart;

    if (deliveryGroups.length > 0) {
      deliveryGroups.map(({ orderProducts }) => {
        orderProducts.map((product) => {
          const { orderProductOptions } = product;

          orderProductOptions.map((option) => {
            const { productNo } = option;
            const price = option.price.salePrice
              ? option.price.salePrice
              : option.price.buyAmt;
            crItems.push({
              id: String(productNo),
              price: price,
              quantity: option["orderCnt"],
            });
          });
        });
      });

      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: "", hash_method: "sha256" },
        { event: "setZipcode", zipcode: "" },
        { event: "setSiteType", type: deviceType },
        {
          event: "addToCart",
          item: crItems,
        }
      );
    }
  } catch (error) {
    console.error("Criteo Script has occurred: ", error);
  }
</script>
```

#### 주문완료페이지 <a href="#undefined-7" id="undefined-7"></a>

* YOUR\_PARTER\_ID 부분은 크리테오 혹은 대행사로부터 받은 p값을 입력 합니다.

Copy

```
<script type="text/javascript">
  try {
    if (sb.order) {
      const {
        orderNo,
        payInfo: { payAmt },
        orderOptionsGroupByPartner,
      } = sb.order;

      const criteoOrderItems = orderOptionsGroupByPartner.flatMap(
        ({ orderOptionsGroupByDelivery }) =>
          orderOptionsGroupByDelivery.flatMap(({ orderOptions }) =>
            orderOptions.map((options) => {
              const {
                productNo: id,
                price: { immediateDiscountAmt: discount, buyPrice: price },
                orderCnt: quantity,
              } = options;

              return {
                id: String(id),
                price,
                quantity,
              };
            })
          )
      );
      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: "", hash_method: "sha256" },
        { event: "setZipcode", zipcode: "" },
        { event: "setSiteType", type: deviceType },
        {
          event: "trackTransaction",
          id: orderNo,
          item: criteoOrderItems,
        }
      );
    }
  } catch (error) {
    console.error("Criteo Script has occurred: ", error);
  }
</script>
```

[<br>](https://marketing-help.nhn-commerce.com/shop-by-ads-script/ads-script/mobion)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://marketing-help.nhn-commerce.com/conversion-tracking-setup/godomall-script-setup/criteo-script.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
