URLをコピーしました!
スキルアップを始める!

【Googleタグマネージャー】設定後の読み込み順番について|Container Loaded・DOM Ready・Window Loaded

Googleタグマネージャー
\ワードプレスのスキルアップはこちら!/ WordPress入門読本

タグマネージャーを設定してプレビューを見ると「Container Loaded」「DOM Ready」「Window Loaded」という順番で読み込みされています。

コンテナのプレビューとデバッグ - タグ マネージャー ヘルプ
タグ構成が想定どおりに動作しているかどうかを確認します。Google タグ マネージャーのプレビューとデバッグモードでは、現在のドラフト コンテナが設定されているかのようにコンテナコードが実装されているサイトを参照できるため、コンテナ設定が...

1 Container Loaded

GTMタグが読み込まれたタイミング。

「Container Loaded」では、下記のような値(Variables)が取得できます。※予め組み込み変数を全てONにしています。

[rml_read_more]

VariableVariable TypeReturn TypeValue
_eventカスタム イベントstring‘gtm.js’
_triggersデータレイヤーの変数string
Click Classesデータレイヤーの変数undefinedundefined
Click Elementデータレイヤーの変数undefinedundefined
Click IDデータレイヤーの変数undefinedundefined
Click Targetデータレイヤーの変数undefinedundefined
Click Text自動イベント変数undefinedundefined
Click URLデータレイヤーの変数undefinedundefined
Container IDコンテナ IDstring‘GTM-XXXXXXX’
Container Versionコンテナのバージョン番号string‘QUICK_PREVIEW’
Debug Modeデバッグモードbooleantrue
Error Lineデータレイヤーの変数undefinedundefined
Error Messageデータレイヤーの変数undefinedundefined
Error URLデータレイヤーの変数undefinedundefined
Eventカスタム イベントstring‘gtm.js’
Form Classesデータレイヤーの変数undefinedundefined
Form Elementデータレイヤーの変数undefinedundefined
Form IDデータレイヤーの変数undefinedundefined
Form Targetデータレイヤーの変数undefinedundefined
Form Text自動イベント変数undefinedundefined
Form URLデータレイヤーの変数undefinedundefined
Google アナリティクス設定Google アナリティクス設定object{ useEcommerceDataLayer: false, doubleClick: true, setTrackerName: false, useDebugVersion: false, useHashAutoLink: true, decorateFormsAutoLink: true, enableLinkId: true, enableEcommerce: true, trackingId: ‘UA-XXXXXXX-1’, fieldsToSet: [{fieldName: ‘cookieDomain’, value: ‘auto’}] }
History Sourceデータレイヤーの変数undefinedundefined
HTML IDHTML IDarray[‘u’, ‘n’, ‘d’, ‘e’, ‘f’, ‘i’, ‘n’, ‘e’, ‘d’]
New History Fragmentデータレイヤーの変数undefinedundefined
New History Stateデータレイヤーの変数undefinedundefined
Old History Fragmentデータレイヤーの変数undefinedundefined
Old History Stateデータレイヤーの変数undefinedundefined
On-Screen Durationデータレイヤーの変数undefinedundefined
Page HostnameURLstring‘eguweb.jp’
Page PathURLstring‘/’
Page URLURLstring‘https://eguweb.jp/?gtm_debug=x’
Percent Visibleデータレイヤーの変数undefinedundefined
Random Number乱数numberXXXXXXXXXX
ReferrerHTTP 参照string‘https://XXXXXXXX.XXXXX.com/’
Scroll Depth Thresholdデータレイヤーの変数undefinedundefined
Scroll Depth Unitsデータレイヤーの変数undefinedundefined
Scroll Directionデータレイヤーの変数undefinedundefined
Video Current Timeデータレイヤーの変数undefinedundefined
Video Durationデータレイヤーの変数undefinedundefined
Video Percentデータレイヤーの変数undefinedundefined
Video Providerデータレイヤーの変数undefinedundefined
Video Statusデータレイヤーの変数undefinedundefined
Video Titleデータレイヤーの変数undefinedundefined
Video URLデータレイヤーの変数undefinedundefined
Video Visibleデータレイヤーの変数undefinedundefined

2 DOM Ready

ブラウザがHTMLソースを読み込んだタイミング。

「DOM Ready」では、下記のような値(Variables)が取得できます。

VariableVariable TypeReturn TypeValue
_eventカスタム イベントstring‘gtm.dom’
_triggersデータレイヤーの変数string
Click Classesデータレイヤーの変数undefinedundefined
Click Elementデータレイヤーの変数undefinedundefined
Click IDデータレイヤーの変数undefinedundefined
Click Targetデータレイヤーの変数undefinedundefined
Click Text自動イベント変数undefinedundefined
Click URLデータレイヤーの変数undefinedundefined
Container IDコンテナ IDstring‘GTM-XXXXXXX’
Container Versionコンテナのバージョン番号string‘QUICK_PREVIEW’
Debug Modeデバッグモードbooleantrue
Error Lineデータレイヤーの変数undefinedundefined
Error Messageデータレイヤーの変数undefinedundefined
Error URLデータレイヤーの変数undefinedundefined
Eventカスタム イベントstring‘gtm.dom’
Form Classesデータレイヤーの変数undefinedundefined
Form Elementデータレイヤーの変数undefinedundefined
Form IDデータレイヤーの変数undefinedundefined
Form Targetデータレイヤーの変数undefinedundefined
Form Text自動イベント変数undefinedundefined
Form URLデータレイヤーの変数undefinedundefined
Google アナリティクス設定Google アナリティクス設定object{ useEcommerceDataLayer: false, doubleClick: true, setTrackerName: false, useDebugVersion: false, useHashAutoLink: true, decorateFormsAutoLink: true, enableLinkId: true, enableEcommerce: true, trackingId: ‘UA-XXXXXXXXX-1’, fieldsToSet: [{fieldName: ‘cookieDomain’, value: ‘auto’}] }
History Sourceデータレイヤーの変数undefinedundefined
HTML IDHTML IDarray[‘u’, ‘n’, ‘d’, ‘e’, ‘f’, ‘i’, ‘n’, ‘e’, ‘d’]
New History Fragmentデータレイヤーの変数undefinedundefined
New History Stateデータレイヤーの変数undefinedundefined
Old History Fragmentデータレイヤーの変数undefinedundefined
Old History Stateデータレイヤーの変数undefinedundefined
On-Screen Durationデータレイヤーの変数undefinedundefined
Page HostnameURLstring‘eguweb.jp’
Page PathURLstring‘/’
Page URLURLstring‘https://eguweb.jp/?gtm_debug=x’
Percent Visibleデータレイヤーの変数undefinedundefined
Random Number乱数number1232968765
ReferrerHTTP 参照string‘https://XXXXXXXX.XXXXX.com/’
Scroll Depth Thresholdデータレイヤーの変数undefinedundefined
Scroll Depth Unitsデータレイヤーの変数undefinedundefined
Scroll Directionデータレイヤーの変数undefinedundefined
Video Current Timeデータレイヤーの変数undefinedundefined
Video Durationデータレイヤーの変数undefinedundefined
Video Percentデータレイヤーの変数undefinedundefined
Video Providerデータレイヤーの変数undefinedundefined
Video Statusデータレイヤーの変数undefinedundefined
Video Titleデータレイヤーの変数undefinedundefined
Video URLデータレイヤーの変数undefinedundefined
Video Visibleデータレイヤーの変数undefinedundefined

3 Window Loaded

ブラウザがウェブページを表示したタイミング。

「Window Loaded」では、下記のような値(Variables)が取得できます。

VariableVariable TypeReturn TypeValue
_eventカスタム イベントstring‘gtm.load’
_triggersデータレイヤーの変数string
Click Classesデータレイヤーの変数undefinedundefined
Click Elementデータレイヤーの変数undefinedundefined
Click IDデータレイヤーの変数undefinedundefined
Click Targetデータレイヤーの変数undefinedundefined
Click Text自動イベント変数undefinedundefined
Click URLデータレイヤーの変数undefinedundefined
Container IDコンテナ IDstring‘GTM-XXXXXXX’
Container Versionコンテナのバージョン番号string‘QUICK_PREVIEW’
Debug Modeデバッグモードbooleantrue
Error Lineデータレイヤーの変数undefinedundefined
Error Messageデータレイヤーの変数undefinedundefined
Error URLデータレイヤーの変数undefinedundefined
Eventカスタム イベントstring‘gtm.load’
Form Classesデータレイヤーの変数undefinedundefined
Form Elementデータレイヤーの変数undefinedundefined
Form IDデータレイヤーの変数undefinedundefined
Form Targetデータレイヤーの変数undefinedundefined
Form Text自動イベント変数undefinedundefined
Form URLデータレイヤーの変数undefinedundefined
Google アナリティクス設定Google アナリティクス設定object{ useEcommerceDataLayer: false, doubleClick: true, setTrackerName: false, useDebugVersion: false, useHashAutoLink: true, decorateFormsAutoLink: true, enableLinkId: true, enableEcommerce: true, trackingId: ‘UA-106553970-1’, fieldsToSet: [{fieldName: ‘cookieDomain’, value: ‘auto’}] }
History Sourceデータレイヤーの変数undefinedundefined
HTML IDHTML IDarray[‘u’, ‘n’, ‘d’, ‘e’, ‘f’, ‘i’, ‘n’, ‘e’, ‘d’]
New History Fragmentデータレイヤーの変数undefinedundefined
New History Stateデータレイヤーの変数undefinedundefined
Old History Fragmentデータレイヤーの変数undefinedundefined
Old History Stateデータレイヤーの変数undefinedundefined
On-Screen Durationデータレイヤーの変数undefinedundefined
Page HostnameURLstring‘eguweb.jp’
Page PathURLstring‘/’
Page URLURLstring‘https://eguweb.jp/?gtm_debug=x’
Percent Visibleデータレイヤーの変数undefinedundefined
Random Number乱数number18869XXXXX
ReferrerHTTP 参照string‘https://XXXXXXXX.XXXXX.com/’
Scroll Depth Thresholdデータレイヤーの変数undefinedundefined
Scroll Depth Unitsデータレイヤーの変数undefinedundefined
Scroll Directionデータレイヤーの変数undefinedundefined
Video Current Timeデータレイヤーの変数undefinedundefined
Video Durationデータレイヤーの変数undefinedundefined
Video Percentデータレイヤーの変数undefinedundefined
Video Providerデータレイヤーの変数undefinedundefined
Video Statusデータレイヤーの変数undefinedundefined
Video Titleデータレイヤーの変数undefinedundefined
Video URLデータレイヤーの変数undefinedundefined
Video Visibleデータレイヤーの変数undefinedundefined

4 Click

なにかの要素をクリックをしたタイミング。

VariableVariable TypeReturn TypeValue
_eventカスタム イベントstring‘gtm.click’
_triggersデータレイヤーの変数string
Click Classesデータレイヤーの変数string‘item-label’
Click Elementデータレイヤーの変数string‘HTMLDivElement: html.jetpack-lazy-images-js-enabled.wf-roboto-n4-active .wf-googlesans-n3-active.wf-googlesans-n4-active.wf-googlesans-i3-active .wf-googlesans-i4-active.wf-googlesans-n5-active.wf-googlesans-i5-active .wf-googlesans-n7-active.wf-googlesans-i7-active.wf-roboto-n3-active.wf- roboto-i3-active.wf-roboto-i4-active.wf-roboto-n5-active.wf-roboto-i5-ac tive.wf-roboto-n7-active.wf-roboto-i7-active.wf-active > body.home.page- template-default.page.page-id-16550.logged-in.admin-bar.body.front-top-p age.public-page.page-body.ff-hiragino.fz-20px.fw-400.hlt-center-logo-wra p.ect-entry-card-wrap.rect-entry-card-wrap.scrollable-sidebar.no-scrolla ble-main.sidebar-right.mblt-footer-mobile-buttons.author-admin.mobile-bu tton-fmb.no-post-author.no-sp-snippet.font-awesome-4.is-header-fixed.cus tomize-support > div.container.wrap.cf#container > div.header-container. fixed-header#header-container > div.header-container-in.cl-slim.hlt-top- menu.wrap#header-container-in > nav.navi.cf#navi > div.navi-in.wrap.cf#n avi-in > ul.menu-top.menu-header.menu-pc#menu-cocoon%e7%94%a8 > li.menu- item.menu-item-type-taxonomy.menu-item-object-category.menu-item-has-no- description#menu-item-32093 > a > div.caption-wrap > div.item-label’
Click IDデータレイヤーの変数string
Click Targetデータレイヤーの変数string
Click Text自動イベント変数string‘アナリティクス’
Click URLデータレイヤーの変数string
Container IDコンテナ IDstring‘GTM-XXXXXXX’
Container Versionコンテナのバージョン番号string‘QUICK_PREVIEW’
Debug Modeデバッグモードbooleantrue
Error Lineデータレイヤーの変数undefinedundefined
Error Messageデータレイヤーの変数undefinedundefined
Error URLデータレイヤーの変数undefinedundefined
Eventカスタム イベントstring‘gtm.click’
Form Classesデータレイヤーの変数string‘item-label’
Form Elementデータレイヤーの変数string‘HTMLDivElement: html.jetpack-lazy-images-js-enabled.wf-roboto-n4-active .wf-googlesans-n3-active.wf-googlesans-n4-active.wf-googlesans-i3-active .wf-googlesans-i4-active.wf-googlesans-n5-active.wf-googlesans-i5-active .wf-googlesans-n7-active.wf-googlesans-i7-active.wf-roboto-n3-active.wf- roboto-i3-active.wf-roboto-i4-active.wf-roboto-n5-active.wf-roboto-i5-ac tive.wf-roboto-n7-active.wf-roboto-i7-active.wf-active > body.home.page- template-default.page.page-id-16550.logged-in.admin-bar.body.front-top-p age.public-page.page-body.ff-hiragino.fz-20px.fw-400.hlt-center-logo-wra p.ect-entry-card-wrap.rect-entry-card-wrap.scrollable-sidebar.no-scrolla ble-main.sidebar-right.mblt-footer-mobile-buttons.author-admin.mobile-bu tton-fmb.no-post-author.no-sp-snippet.font-awesome-4.is-header-fixed.cus tomize-support > div.container.wrap.cf#container > div.header-container. fixed-header#header-container > div.header-container-in.cl-slim.hlt-top- menu.wrap#header-container-in > nav.navi.cf#navi > div.navi-in.wrap.cf#n avi-in > ul.menu-top.menu-header.menu-pc#menu-cocoon%e7%94%a8 > li.menu- item.menu-item-type-taxonomy.menu-item-object-category.menu-item-has-no- description#menu-item-32093 > a > div.caption-wrap > div.item-label’
Form IDデータレイヤーの変数string
Form Targetデータレイヤーの変数string
Form Text自動イベント変数string‘アナリティクス’
Form URLデータレイヤーの変数string
Google アナリティクス設定Google アナリティクス設定object{ useEcommerceDataLayer: false, ecommerceMacroData: ‘item-label’, doubleClick: true, setTrackerName: false, useDebugVersion: false, useHashAutoLink: true, decorateFormsAutoLink: true, enableLinkId: true, enableEcommerce: true, trackingId: ‘UA-XXXXXXXXX-1’, fieldsToSet: [{fieldName: ‘cookieDomain’, value: ‘auto’}] }
History Sourceデータレイヤーの変数undefinedundefined
HTML IDHTML IDarray[‘u’, ‘n’, ‘d’, ‘e’, ‘f’, ‘i’, ‘n’, ‘e’, ‘d’]
New History Fragmentデータレイヤーの変数undefinedundefined
New History Stateデータレイヤーの変数undefinedundefined
Old History Fragmentデータレイヤーの変数undefinedundefined
Old History Stateデータレイヤーの変数undefinedundefined
On-Screen Durationデータレイヤーの変数undefinedundefined
Page HostnameURLstring‘eguweb.jp’
Page PathURLstring‘/’
Page URLURLstring‘https://eguweb.jp/?gtm_debug=x’
Percent Visibleデータレイヤーの変数undefinedundefined
Random Number乱数number10059XXXXX
ReferrerHTTP 参照string‘https://XXXXXXXX.XXXXX.com/’
Scroll Depth Thresholdデータレイヤーの変数undefinedundefined
Scroll Depth Unitsデータレイヤーの変数undefinedundefined
Scroll Directionデータレイヤーの変数undefinedundefined
Video Current Timeデータレイヤーの変数undefinedundefined
Video Durationデータレイヤーの変数undefinedundefined
Video Percentデータレイヤーの変数undefinedundefined
Video Providerデータレイヤーの変数undefinedundefined
Video Statusデータレイヤーの変数undefinedundefined
Video Titleデータレイヤーの変数undefinedundefined
Video URLデータレイヤーの変数undefinedundefined
Video Visibleデータレイヤーの変数undefinedundefined

5 Link Click

リンクをクリックしたタイミング。

VariableVariable TypeReturn TypeValue
_eventカスタム イベントstring‘gtm.linkClick’
_triggersデータレイヤーの変数string‘31676814_8,1_15,1_22’
Click Classesデータレイヤーの変数string
Click Elementデータレイヤーの変数string‘https://eguweb.jp/category/google-analytics: html.jetpack-lazy-images-j s-enabled.wf-roboto-n4-active.wf-googlesans-n3-active.wf-googlesans-n4-a ctive.wf-googlesans-i3-active.wf-googlesans-i4-active.wf-googlesans-n5-a ctive.wf-googlesans-i5-active.wf-googlesans-n7-active.wf-googlesans-i7-a ctive.wf-roboto-n3-active.wf-roboto-i3-active.wf-roboto-i4-active.wf-rob oto-n5-active.wf-roboto-i5-active.wf-roboto-n7-active.wf-roboto-i7-activ e.wf-active > body.home.page-template-default.page.page-id-16550.logged- in.admin-bar.body.front-top-page.public-page.page-body.ff-hiragino.fz-20 px.fw-400.hlt-center-logo-wrap.ect-entry-card-wrap.rect-entry-card-wrap. scrollable-sidebar.no-scrollable-main.sidebar-right.mblt-footer-mobile-b uttons.author-admin.mobile-button-fmb.no-post-author.no-sp-snippet.font- awesome-4.is-header-fixed.customize-support > div.container.wrap.cf#cont ainer > div.header-container.fixed-header#header-container > div.header- container-in.cl-slim.hlt-top-menu.wrap#header-container-in > nav.navi.cf #navi > div.navi-in.wrap.cf#navi-in > ul.menu-top.menu-header.menu-pc#me nu-cocoon%e7%94%a8 > li.menu-item.menu-item-type-taxonomy.menu-item-obje ct-category.menu-item-has-no-description#menu-item-32093 > a’
Click IDデータレイヤーの変数string
Click Targetデータレイヤーの変数string
Click Text自動イベント変数string‘アナリティクス’
Click URLデータレイヤーの変数string‘https://eguweb.jp/category/google-analytics’
Container IDコンテナ IDstring‘GTM-N74L3C3’
Container Versionコンテナのバージョン番号string‘QUICK_PREVIEW’
Debug Modeデバッグモードbooleantrue
Error Lineデータレイヤーの変数undefinedundefined
Error Messageデータレイヤーの変数undefinedundefined
Error URLデータレイヤーの変数undefinedundefined
Eventカスタム イベントstring‘gtm.linkClick’
Form Classesデータレイヤーの変数string
Form Elementデータレイヤーの変数string‘https://eguweb.jp/category/google-analytics: html.jetpack-lazy-images-j s-enabled.wf-roboto-n4-active.wf-googlesans-n3-active.wf-googlesans-n4-a ctive.wf-googlesans-i3-active.wf-googlesans-i4-active.wf-googlesans-n5-a ctive.wf-googlesans-i5-active.wf-googlesans-n7-active.wf-googlesans-i7-a ctive.wf-roboto-n3-active.wf-roboto-i3-active.wf-roboto-i4-active.wf-rob oto-n5-active.wf-roboto-i5-active.wf-roboto-n7-active.wf-roboto-i7-activ e.wf-active > body.home.page-template-default.page.page-id-16550.logged- in.admin-bar.body.front-top-page.public-page.page-body.ff-hiragino.fz-20 px.fw-400.hlt-center-logo-wrap.ect-entry-card-wrap.rect-entry-card-wrap. scrollable-sidebar.no-scrollable-main.sidebar-right.mblt-footer-mobile-b uttons.author-admin.mobile-button-fmb.no-post-author.no-sp-snippet.font- awesome-4.is-header-fixed.customize-support > div.container.wrap.cf#cont ainer > div.header-container.fixed-header#header-container > div.header- container-in.cl-slim.hlt-top-menu.wrap#header-container-in > nav.navi.cf #navi > div.navi-in.wrap.cf#navi-in > ul.menu-top.menu-header.menu-pc#me nu-cocoon%e7%94%a8 > li.menu-item.menu-item-type-taxonomy.menu-item-obje ct-category.menu-item-has-no-description#menu-item-32093 > a’
Form IDデータレイヤーの変数string
Form Targetデータレイヤーの変数string
Form Text自動イベント変数string‘アナリティクス’
Form URLデータレイヤーの変数string‘https://eguweb.jp/category/google-analytics’
Google アナリティクス設定Google アナリティクス設定object{ useEcommerceDataLayer: false, ecommerceMacroData: ”, doubleClick: true, setTrackerName: false, useDebugVersion: false, useHashAutoLink: true, decorateFormsAutoLink: true, enableLinkId: true, enableEcommerce: true, trackingId: ‘UA-106553970-1’, fieldsToSet: [{fieldName: ‘cookieDomain’, value: ‘auto’}] }
History Sourceデータレイヤーの変数undefinedundefined
HTML IDHTML IDarray[‘u’, ‘n’, ‘d’, ‘e’, ‘f’, ‘i’, ‘n’, ‘e’, ‘d’]
New History Fragmentデータレイヤーの変数undefinedundefined
New History Stateデータレイヤーの変数undefinedundefined
Old History Fragmentデータレイヤーの変数undefinedundefined
Old History Stateデータレイヤーの変数undefinedundefined
On-Screen Durationデータレイヤーの変数undefinedundefined
Page HostnameURLstring‘eguweb.jp’
Page PathURLstring‘/’
Page URLURLstring‘https://eguweb.jp/?gtm_debug=x’
Percent Visibleデータレイヤーの変数undefinedundefined
Random Number乱数number1222490563
ReferrerHTTP 参照string‘https://tagassistant.google.com/’
Scroll Depth Thresholdデータレイヤーの変数undefinedundefined
Scroll Depth Unitsデータレイヤーの変数undefinedundefined
Scroll Directionデータレイヤーの変数undefinedundefined
Video Current Timeデータレイヤーの変数undefinedundefined
Video Durationデータレイヤーの変数undefinedundefined
Video Percentデータレイヤーの変数undefinedundefined
Video Providerデータレイヤーの変数undefinedundefined
Video Statusデータレイヤーの変数undefinedundefined
Video Titleデータレイヤーの変数undefinedundefined
Video URLデータレイヤーの変数undefinedundefined
Video Visibleデータレイヤーの変数undefinedundefined

あとはイベントで設定する

これらを使って、イベントパラメータやユーザープロパティに値を設定していきます。

詳しくは他の記事でも詳しく書いていますので、ご参考ください😃

Kindle Unlimited 会員は無料で購読できます
購読はこちら
Kindle Unlimited 会員は無料で購読できます
購読はこちら