plugin-icon

GTM4WP – A Google Tag Manager (GTM) plugin for WordPress

Advanced tag management for WordPress with Google Tag Manager
評価機能
4.6
最終更新日時
April 4, 2024
バージョン
1.20.2
有効インストール数
700K
GTM4WP – A Google Tag Manager (GTM) plugin for WordPress

Google Tag Manager (GTM) is Google’s free tool for everyone to manage and deploy analytics and marketing tags as well as other code snippets using an intuitive web UI. To learn more about this tool, visit the official website.

This plugin places the GTM container code snippets onto your WordPress website so that you do not need to add it manually. Multiple containers are also supported!

The plugin complements your GTM setup by pushing page meta data and user information into the so called data layer. Google’s official help pages includes more details about the data layer.

PHP 7.4 is required to use this plugin.

GTM コンテナコードの置き換え

オリジナルのGTMコンテナコードは2つのパートに分かれます:

前半は、サイト全ページの <head> セクションに追加される JavaScript コードスニペットです。 これは GTM のすべての機能を有効化する重要な部分です。本プラグインは、この部分をサイトに正しく設置するのに役立ちます。

後半は、ユーザーの JavaScript が無効な場合にフォールバックとして機能する iframe スニペットです。 Google は最高のパフォーマンスを得るために、このコードスニペットを各ページの <body> タグの直後に設置することを推奨しています。

理想的ではありませんが、これはコードのより下のほうに設置しても機能します。本プラグインは2番目のコード スニペットのコード配置オプションを提供します。

If your WordPress theme is compatible with the additions of WordPress 5.2 then this plugin will place this second code to the right place. Users of the Genisis theme, GeneratePress theme, Elementor, Oxygen Builder and Beaver Builder Theme will also have this placed correctly. To utilize this, set the compatibility mode in plugin options to off.

All other users can place this second code snippet using a custom PHP code (“Manually coded” option) or select the so called “Footer” option to add the code lower in the code (it is not the recommended way but will work)

基本データに含まれるもの

  • 投稿 / 固定ページのタイトル
  • 投稿 / 固定ページの日付
  • 投稿 / 固定ページのカテゴリー名
  • 投稿 / 固定ページのタグ名
  • 投稿 / 固定ページの投稿者 ID 名と名前
  • 投稿 / 固定ページの ID
  • 投稿タイプ
  • post format
  • 現在のページを含む、現在のカテゴリー / タグ / タクソノミー内の投稿数
  • 任意の投稿タイプに紐づくカスタムターム
  • ログイン状態
  • ログイン中ユーザーの権限グループ
  • ログイン中ユーザー ID (Google アナリティクスでクロスデバイス行動を追跡するため)
  • logged in user email address (both unhashed and SHA256 hased values to be used with tracking)
  • ログイン中ユーザーの作成日
  • サイト検索データ
  • サイト名と ID (WordPress マルチサイトインスタンス向け)
  • 訪問者の IP アドレス (使用する際は、訪問者の明示的な同意を得てください)

ブラウザー / OS / 端末データ

  • ブラウザーデータ (名前、バージョン、エンジン)
  • OS データ (名前、バージョン)
  • 端末データ (種類、製造元、モデル)

WhichBrowser ライブラリの提供データを使用します: http://whichbrowser.net/

気象データ

(ベータ)

ユーザーの現在の気象条件に関するデータを dataLayer にプッシュします。これは、広告プラットフォームで天気関連のオーディエンス/リマーケティングリストを生成するために使用でき、Web 分析ソリューションでユーザー セグメンテーションを可能にします。

  • 気象カテゴリー (曇り、雨、晴れなど)
  • 気象の説明: より招待なデータ
  • 摂氏または華氏の温度
  • 気圧
  • 風速と気温

気象データは Open Weather Map からクエリされます。サイトのトラフィックによっては、追加料金が適用される場合があります。 http://openweathermap.org/price

機能を利用するには、OpenWeatherMap の (無料の) API キーが必要です。

ipstack.com は、サイト訪問者の位置を特定するために使用されます。この機能を動作させるには、IPStack.com の (無料の) API キーが必要です。 https://ipstack.com/product

メディア再生イベント

(試験中)

あらゆる埋め込みメディアのユーザーインタラクションを追跡します。

  • YouTube
  • Vimeo
  • Soundcloud

DataLayer イベントは、メディアプレイヤーの読み込み、メディアの再生中、一時停止 / 停止、およびオプションでユーザーがメディア再生時間の10、20、30、…、90、100% に達したときに発火するよう選択できます。

埋め込みメディアの追跡は、WordPress 組み込みの oEmbed 機能はもちろん、他のほとんどのメディアプラグインやコピー & ペーストコードで設置するものに対応しています。ページ読み込み後にサイトに挿入されるプレイヤーには、現在非対応です。

スクロールトラッキング

訪問者がページトップから下までを、どのようにスクロールしたかを基準にタグを発火します。 例えば、「読者」(一定時間ページで過ごす) と「スクロールだけする人」(数秒以内にスクロールする人) を分けることが考えられます。これらのイベントを使用して、アナリティクスタグやリマーケティング / コンバージョンタグ (マイクロ コンバージョン用) を発火できます。

スクロールトラッキングは、以下の方々が開発したものを元にしています。

  • Nick Mihailovski
  • Thomas Baekdal
  • Avinash Kaushik
  • Joost de Valk
  • Eivind Savio
  • Justin Cutroni

オリジナルスクリプト: http://cutroni.com/blog/2012/02/21/advanced-content-tracking-with-google-analytics-part-1/

タグ マネージャーのタグ、トリガー、変数のブラックリストとホワイトリスト

サイトのセキュリティ強化のため、タグ / トリガー / 変数をホワイトリストおよびブラックリスト登録するオプションがあります。 GTM の設定に関係なく、特定タグの発火や、特定の種類の変数の使用を防止できます。

GTM アカウントに関連付けられた Google アカウントがハッキングされると、攻撃者はホスティング サーバー上のコードにアクセスしなくても、サイト上でマルウェアを簡単に実行できてしまいます。カスタム HTML タグやカスタム JavaScript 変数をブラックリストに登録することで、タグ マネージャーコンテナを保護できます。

機能連携

複数の人気プラグインとの機能連携があります。今後さらに追加予定です !

  • Contact Form 7: フォームが何らかの結果 (メール送信、メール失敗、スパム検出、無効な入力)での送信時にイベントを発火
  • WooCommerce:
    • Implementation of GA4 E-commerce
    • プロモーションには非対応、なぜなら WooCommerce 本体にその機能は (まだ) ないので
    • 返金は非対応
    • Compatibility with High Performance Order Storage (HPOS)
  • AMP: ページの AMP バージョンに AMP コンテナを読み込む
  • Cookiebot: use automatic cookie blocking mode if needed
  • Google Consent Mode v2: fire the “default” command with specific consent flags to integrat with non-certified Consent Management Platforms (CMPs) and plugins.

サーバーコンテナ

If you are using a server side container you can enter your custom domain name and custom path to load gtm.js from your there.

Exclude specific user roles from being tracked

You can set which user roles needs to be excluded from tracking when a user with that role visits the frontend. This will completely disable the container code for that user.

無料Creator プランを利用中
インストールすることで、WordPress.com の利用規約サードパーティ製プラグインの規約に同意したとみなされます。
有効インストール数
700K
最大テスト回数
6.5.4
このプラグインをダウンロードして、インストール型 WordPress のインストールに使用できます。