separator | verticalSeparator |
---|---|
<!--s--> |
<!--v--> |
- Google Tag Manager
- Google Analytics
- USERDIVE
基本的な使い方を覚えましょう。
- タグ
- トリガー
- プレビューモード
- 変数
- ワークスペース
タグマネージャーで反映できる形(カスタムタグ)
中身は JavaScript
というものを書きます。
<script>
console.log('hello world')
</script>
サイトを作って反映に挑戦する (quickstart)
- GTM コンテナを作成する(ID を発効する)
- サイトを立ち上げる(Github を使う)
- GTM の ID 書き換えて保存する
普段はやらないのでゆっくりやりましょう!
GTM コンテナを作成する (公式)
サイトを立ち上げる (fork する)
workspace を作る
USERDIVE を反映する (公式)
<!-- USERDIVE tag -->
<script>
(function(e,t,n,c,r,a,s,u){e.USERDIVEObject=r;e[r]=e[r]||function(){(e[r].queue=e[r].queue||[]).push(arguments)};
s=t.createElement(n);u=t.getElementsByTagName(n)[0];s.async=1;s.src=c;s.charset=a;u.parentNode.insertBefore(s,u)
})(window,document,"script","//harpoon3.userdive.com/static/UDTracker.js","ud","UTF-8");
ud("create", "28-105", {"env": "stg"});
ud("analyze");
</script>
<!-- End USERDIVE tag -->
newbie-training/?userdive=1
プレビューモードを使いましょう
<script>
if (jQuery) {
jQuery('#about').on('click', function (e) {
ud('setCustomVar', ['about click'])
})
}
</script>