---
# System prepended metadata

title: Suzette 測試站

---

# Suzette 測試站
網址: https://stg.suzette-shop.jp/shop/default.aspx

###  ECbeing
登入後台: https://stg.suzette-shop.jp/office/
登入帳號: bebit-hank
登入密碼: 找PD-Hank 
IP白名單: `34-85-123-188` 

### OS測試環境
登入網址: https://jp.omnisegment.com/accounts/login/
環境名稱: @SUZETTETEST
TID: OA-f3a32e9f
登入帳號: OmniRD@SUZETTETEST
登入密碼: 找PD-Hank


## 前置作業

測試站有 IP 白名單，需要設定proxy


1. 請 Eric 開 omnisegment-jp-worker-1 的權限

  
2. 連線到 omnisegment-jp-worker-1 , -D 啟動 SOCKS 代理伺服器，client映射到 localhost:5000
 ```bash
    gcloud compute ssh --zone "asia-northeast1-a" "omnisegment-jp-worker-1"  --tunnel-through-iap --project "omnisegment-jp" -- -D localhost:5000
   ```
3. 開啟 SOCK Proxy
    1. 去 Chrome 設定
    2. 搜尋 Proxy
    3. 點選 Proxy 設定
    4. 設定 SOCKS 代理伺服器
 ![](https://hackmd.io/_uploads/HJgY4ZMI2.png)
 ![](https://hackmd.io/_uploads/H10kSZMU3.png)

4. 即可看到登入頁面 https://stg.suzette-shop.jp/office/
 
 ![](https://hackmd.io/_uploads/HJWXAAq83.png)

 
## 埋馬

大部分事件透過後台實作，少部分事件( `RemoveFromCart`, `CompleteRegistration` )後台為提供寫在 `src/user2/scripts/OA-f3a32e9f.ts`
 
 ### 後台埋馬位置
![](https://hackmd.io/_uploads/rJrhFRqI2.png)
![](https://hackmd.io/_uploads/Bk-4qA983.png)

### 共通
```htmlembedded=
<!-- Omnisegment -->
<script>
  window.i13nData = {
    tagId: "OA-f3a32e9f",
    uid: "__%customer_guid%__" == "00000000-0000-0000-0000-000000000000" ? null : "__%customer_guid%__",
    session: (__ % session) % __,
  };
</script>
<script defer src="//omnitag.omniscientai.com/omnitag.js?id=OA-f3a32e9f"></script>

<!-- Omnisegment -->
```

### トップページ
```htmlembedded=
<!-- Omnisegment -->
<script>
  window.i13nData = {
    tagId: "OA-f3a32e9f",
    uid: "__%customer_guid%__" == "00000000-0000-0000-0000-000000000000" ? null : "__%customer_guid%__",
    session: (__ % session) % __,
  };
</script>
<script defer src="//omnitag.omniscientai.com/omnitag.js?id=OA-f3a32e9f"></script>
<!-- Omnisegment -->

```


### 商品一覧(検索結果)
* ProductImpressions
* Search
* AddToCart
```htmlembedded=
<!-- Omnisegment -->
<script>
  setTimeout(() => {
    dataLayer.push({
      i13n: {
        uid: "__%customer_guid%__" == "00000000-0000-0000-0000-000000000000" ? null : "__%customer_guid%__",
        action: "ViewContent",
        currencyCode: "JPY",
        impressions:
          ecommerceList_GA4?.impressionDatasItems?.map(({ item_id, item_name }) => ({
            id: item_id,
            name: item_name,
          })) ?? [],
      },
    });
  }, 1200);
</script>

<script>
  setTimeout(() => {
    dataLayer.push({
      i13n: {
        action: "Search",
        uid: "__%customer_guid%__",
        label: {
          search_string: i13n.getUrl("keyword"),
        },
      },
    });
  }, 1200);
</script>

<script>
  Array.from(document.querySelectorAll(".block-add-cart .block-add-cart--btn")).forEach(function (element) {
    element.addEventListener("click", function (e) {
      dataLayer.push({
        i13n: {
          uid: "__%customer_guid%__" == "00000000-0000-0000-0000-000000000000" ? null : "__%customer_guid%__",
          action: "AddToCart",
          products: [
            {
              id: e.target?.href?.split("goods=")?.[1],
              name: e.target.innerText,
            },
          ],
        },
      });
    });
  });
</script>


```

### 商品一覧(カテゴリ)	
* ProductImpressions
* AddToCart
```htmlembedded=
<!-- Omnisegment -->
<script>
  console.log("__%cart_goods_20%__");
  setTimeout(() => {
    dataLayer.push({
      i13n: {
        uid: "__%customer_guid%__" == "00000000-0000-0000-0000-000000000000" ? null : "__%customer_guid%__",
        action: "ViewContent",
        currencyCode: "JPY",
        impressions:
          ecommerceList_GA4?.impressionDatasItems?.map(({ item_id, item_name }) => ({
            id: item_id,
            name: item_name,
          })) ?? [],
      },
    });
  }, 2000);
</script>

<script>
  Array.from(document.querySelectorAll(".block-add-cart .block-add-cart--btn")).forEach(function (element) {
    element.addEventListener("click", function (e) {
      dataLayer.push({
        i13n: {
          uid: "__%customer_guid%__" == "00000000-0000-0000-0000-000000000000" ? null : "__%customer_guid%__",
          action: "AddToCart",
          products: [
            {
              id: e.target?.href?.split("goods=")?.[1],
              name: e.target.innerText,
            },
          ],
        },
      });
    });
  });
</script>

```

### 商品一覧(イベント)	
* ProductImpressions
* AddToCart
```htmlembedded=

<!-- Omnisegment -->
<script>
  setTimeout(() => {
    dataLayer.push({
      i13n: {
        uid: "__%customer_guid%__" == "00000000-0000-0000-0000-000000000000" ? null : "__%customer_guid%__",
        action: "ViewContent",
        currencyCode: "JPY",
        impressions:
          ecommerceList_GA4?.impressionDatasItems?.map(({ item_id, item_name }) => ({
            id: item_id,
            name: item_name,
          })) ?? [],
      },
    });
  }, 2000);
</script>

<script>
  Array.from(document.querySelectorAll(".block-add-cart .block-add-cart--btn")).forEach(function (element) {
    element.addEventListener("click", function (e) {
      dataLayer.push({
        i13n: {
          uid: "__%customer_guid%__" == "00000000-0000-0000-0000-000000000000" ? null : "__%customer_guid%__",
          action: "AddToCart",
          products: [
            {
              id: e.target?.href?.split("goods=")?.[1],
              name: e.target.innerText,
            },
          ],
        },
      });
    });
  });
</script>

```

### 商品一覧(ジャンル)	
* ProductImpressions
* AddToCart
```htmlembedded=
<!-- Omnisegment -->
<script>
  setTimeout(() => {
    dataLayer.push({
      i13n: {
        uid: "__%customer_guid%__" == "00000000-0000-0000-0000-000000000000" ? null : "__%customer_guid%__",
        action: "ViewContent",
        currencyCode: "JPY",
        impressions:
          ecommerceList_GA4?.impressionDatasItems?.map(({ item_id, item_name }) => ({
            id: item_id,
            name: item_name,
          })) ?? [],
      },
    });
  }, 2000);
</script>

<script>
  Array.from(document.querySelectorAll(".block-add-cart .block-add-cart--btn")).forEach(function (element) {
    element.addEventListener("click", function (e) {
      dataLayer.push({
        i13n: {
          uid: "__%customer_guid%__" == "00000000-0000-0000-0000-000000000000" ? null : "__%customer_guid%__",
          action: "AddToCart",
          products: [
            {
              id: e.target?.href?.split("goods=")?.[1],
              name: e.target.innerText,
            },
          ],
        },
      });
    });
  });
</script>

```

### 商品詳細	
* AddToCart
* ProductDetail
```htmlembedded=
<!-- Omnisegment -->
<script>
  window.dataLayer = window.dataLayer || [];
  dataLayer.push({
    i13n: {
      action: "ViewContent",
      uid: "__%customer_guid%__" == "00000000-0000-0000-0000-000000000000" ? null : "__%customer_guid%__",
      currencyCode: "JPY",
      detailProducts: [{ id: "__%goods%__", name: "__%name%__" }],
    },
  });
  var oAdd = document.querySelector(".block-add-cart .block-add-cart--btn");
  oAdd.addEventListener("click", function () {
    window.i13n.dispatch("action", {
      I13N: {
        uid: "__%customer_guid%__" == "00000000-0000-0000-0000-000000000000" ? null : "__%customer_guid%__",
        action: "AddToCart",
        products: [{ id: "__%goods%__", name: "__%name%__" }],
      },
    });
  });
</script>
<!-- Omnisegment -->

```

### 商品詳細(エラー時)	
無
```htmlembedded=

```

### 買い物かご	
* Checkout
```htmlembedded=
<!-- Omnisegment -->
<script>
  setTimeout(() => {
    dataLayer.push({
      i13n: {
        uid: "__%customer_guid%__" == "00000000-0000-0000-0000-000000000000" ? null : "__%customer_guid%__",
        action: "Checkout",
        stepNo: 1,
        products:
          ecommerceList_GA4?.impressionDatasItems?.map(({ item_id, item_name }) => ({
            id: item_id,
            name: item_name,
          })) ?? [],
      },
    });
  }, 1500);
</script>
<!-- Omnisegment -->

```

### 購入履歴詳細
無
```htmlembedded=

```

### 注文完了 	
*  Purchase
```htmlembedded=
<!-- Omnisegment -->
<script>
  window.dataLayer = window.dataLayer || []
  dataLayer.push({ i13n: null });
  dataLayer.push({
    'i13n': {
      uid: '__%customer_guid%__' == '00000000-0000-0000-0000-000000000000'? null : '__%customer_guid%__' ,
      action: "Purchase",
      purchaseId: "__%order_id%__",
      revenue: "__%order_subtotal%__",
      products:  [__IF_EXISTS__%order_goods_1%__{"id": "__%order_goods_1%__","price":__%order_price_1%__,"quantity":__%order_qty_1%__}__END_IF____IF_EXISTS__%order_goods_2%__,{"id": "__%order_goods_2%__","price":__%order_price_2%__,"quantity":__%order_qty_2%__}__END_IF____IF_EXISTS__%order_goods_3%__,{"id": "__%order_goods_3%__","price":__%order_price_3%__,"quantity":__%order_qty_3%__}__END_IF____IF_EXISTS__%order_goods_4%__,{"id": "__%order_goods_4%__","price":__%order_price_4%__,"quantity":__%order_qty_4%__}__END_IF____IF_EXISTS__%order_goods_5%__,{"id": "__%order_goods_5%__","price":__%order_price_5%__,"quantity":__%order_qty_5%__}__END_IF____IF_EXISTS__%order_goods_6%__,{"id": "__%order_goods_6%__","price":__%order_price_6%__,"quantity":__%order_qty_6%__}__END_IF____IF_EXISTS__%order_goods_7%__,{"id": "__%order_goods_7%__","price":__%order_price_7%__,"quantity":__%order_qty_7%__}__END_IF____IF_EXISTS__%order_goods_8%__,{"id": "__%order_goods_8%__","price":__%order_price_8%__,"quantity":__%order_qty_8%__}__END_IF____IF_EXISTS__%order_goods_9%__,{"id": "__%order_goods_9%__","price":__%order_price_9%__,"quantity":__%order_qty_9%__}__END_IF____IF_EXISTS__%order_goods_10%__,{"id": "__%order_goods_10%__","price":__%order_price_10%__,"quantity":__%order_qty_10%__}__END_IF____IF_EXISTS__%order_goods_11%__,{"id": "__%order_goods_11%__","price":__%order_price_11%__,"quantity":__%order_qty_11%__}__END_IF____IF_EXISTS__%order_goods_12%__,{"id": "__%order_goods_12%__","price":__%order_price_12%__,"quantity":__%order_qty_12%__}__END_IF____IF_EXISTS__%order_goods_13%__,{"id": "__%order_goods_13%__","price":__%order_price_13%__,"quantity":__%order_qty_13%__}__END_IF____IF_EXISTS__%order_goods_14%__,{"id": "__%order_goods_14%__","price":__%order_price_14%__,"quantity":__%order_qty_14%__}__END_IF____IF_EXISTS__%order_goods_15%__,{"id": "__%order_goods_15%__","price":__%order_price_15%__,quantity":"__%order_qty_15%__}__END_IF____IF_EXISTS__%order_goods_16%__,{"id": "__%order_goods_16%__","price":__%order_price_16%__,"quantity":__%order_qty_16%__}__END_IF____IF_EXISTS__%order_goods_17%__,{"id": "__%order_goods_17%__","price":__%order_price_17%__,"quantity":__%order_qty_17%__}__END_IF____IF_EXISTS__%order_goods_18%__,{"id": "__%order_goods_18%__","price":__%order_price_18%__,"quantity":__%order_qty_18%__}__END_IF____IF_EXISTS__%order_goods_19%__,{"id": "__%order_goods_19%__","price":__%order_price_19%__,"quantity":__%order_qty_19%__}__END_IF____IF_EXISTS__%order_goods_20%__,{"id": "__%order_goods_20%__","price":__%order_price_20%__,"quantity":__%order_qty_20%__}__END_IF__],
    }
  });
</script>
<!-- Omnisegment -->

```




