入ってください
メニュー

Mintegral Pixel: Google Tag Managerを使った連携ガイド

Integration Guide

このガイドでは、完全に自社構築した Web サイト、Headless Mode で運用している Shopify stores、または他の CMS platforms で構築されたサイトなど、custom websites に Mintegral Pixel を連携する方法を説明します。

連携方法は 2 つあります。

  1. Google Tag Manager (GTM) を使用して scripts と tracking codes を管理する
  2. Mintegral Pixel を custom online store に直接埋め込む

どちらの方法でも、page views、user interactions、conversion events をトラッキングできます。

このガイドでは、Method #1 として GTM 経由での連携を説明します。


Integration via Google Tag Manager (GTM)

Use case: Web サイトで GTM を使用して scripts と tracking codes を管理している場合。

Integration Steps

Step 1: Mintegral Pixel SDK を読み込む

  • GTM で Tags → New → Custom HTML Tag に移動します。
  • 以下のコードを貼り付けます。
Copy
<script>
(function (w, d) {
  var u = "https://cdn-static.mintegral.com/sdk/pixel.js";
  if (w.mintegralPixel) return;
  var s = (w.mintegralPixel = function () {
    s.performOperation
      ? s.performOperation.apply(s, arguments)
      : s.operationQueue.push(arguments);
  });
  s.operationQueue = [];
  var f = d.getElementsByTagName("script")[0],
    e = d.createElement("script");
  e.async = !0;
  e.src = u;
  f.parentNode.insertBefore(e, f);
})(window, document);

mintegralPixel("init", {
  setupType: 1 // 1 - self-built website
});
</script>
  • trigger を All Pages に設定し、tag を保存します。

⚠️ Note: 重複 events を避けるため、SDK は各ページで 1 回だけ読み込んでください。

Step 2: Mintegral Official Events をレポートする

Mintegral Event Data Structure

Mintegral にレポートされるすべての events は、以下の標準 data structure に従う必要があります。

Name Type Description
type string event の名前。利用可能な events については Standard Events and Objectsを参照してください。
data object event のデータ。送信する data については Standard Events and Objectsを参照してください。

以下のコードをコピー&ペーストし、Website 上で Data Layer を準備します。

Copy
dataLayer.push({
  "event": "purchaseEvent",
  "mtg_type": "purchase",
  "mtg_data": {
    "currency": "USD",
    "value": 179.98,
    "items": [
      {
        "item_variant_id": "sku123-blue-42",
        "item_id": "sku123",
        "item_name": "Air Sneakers",
        "price": 89.99,
        "quantity": 2,
        "image_url": "https://cdn.example.com/images/sku123.jpg"
      }
    ]
  }
});

⚠️ Note:

mtg_typemtg_data は Mintegral specifications に準拠している必要があります。

event は GTM triggers のみに使用され、SDK reporting には影響しません。

GTM Configuration

  • Data Layer Variables を作成します。

DLV - MTG Typemtg_type

DLV - MTG Datamtg_data

  • Custom Event Trigger を作成します。

Event name: 例: purchaseEvent

  • Custom HTML Tag を作成します。

以下のコードをコピー&ペーストし、trigger を割り当てて configuration を公開します。

Copy
<script>
mintegralPixel("track", {
  "type": "{{DLV - MTG Type}}",
  "data": {{DLV - MTG Data}}
});
</script>
前の
Mintegral Pixel: カスタムオンラインストア連携ガイド
Mintegral Pixel: カスタムオンラインストアへの直接連携ガイド
最近変更された: 2026-08-06