1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

(メモ)ページビューと簡単なイベントGoogleAnalyticsで取得するための基本的な流れ

Last updated at Posted at 2017-03-18

①GoogleAnalyticsでプロパティ作る
②トラッキングコードを

の直後に入れる
③イベントを取得したい要素に以下のような感じでコードを入れる
<a href="#" onclick="ga('send', 'event', 'a', 'click', 'Open popup',{nonInteraction:true});">

<input type="submit" onsubmit="ga('send', 'event', 'input', 'submit', 'Send Request',{nonInteraction: false});">

(参考)
・フォーム送信イベントについて
http://sinap.jp/blog/2015/06/efo04.html
・非インタラクションについて
http://primarytext.jp/blog/1427
・イベントトラッキングコードの各フィールド名の意味
https://developers.google.com/analytics/devguides/collection/analyticsjs/events?hl=ja

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?