Google Analytics Core Reporting API で指定するディメンション(dimensions)やメトリクス(metrics)の覚書です。
似たようなのが多くて混乱したので、使ったところだけ注釈を入れています。
順次更新しています。
Contents
- 1 User
- 2 Session
- 3 Traffic Sources
- 4 Goal Conversions
- 4.1 Dimensions
- 4.2 Metrics
- 4.2.1 ga:goalXXStarts
- 4.2.2 ga:goalStartsAll
- 4.2.3 ga:goalXXCompletions
- 4.2.4 ga:goalCompletionsAll
- 4.2.5 ga:goalXXValue
- 4.2.6 ga:goalValueAll
- 4.2.7 ga:goalValuePerSession
- 4.2.8 ga:goalXXConversionRate
- 4.2.9 ga:goalConversionRateAll
- 4.2.10 ga:goalXXAbandons
- 4.2.11 ga:goalAbandonsAll
- 4.2.12 ga:goalXXAbandonRate
- 4.2.13 ga:goalAbandonRateAll
- 5 Platform or Device
- 5.1 Dimensions
- 5.1.1 ga:browser (ブラウザ)
- 5.1.2 ga:browserVersion (ブラウザバージョン)
- 5.1.3 ga:operatingSystem (OS[オペレーティング・システム])
- 5.1.4 ga:operatingSystemVersion (OSのバージョン)
- 5.1.5 ga:mobileDeviceBranding
- 5.1.6 ga:mobileDeviceModel
- 5.1.7 ga:mobileInputSelector
- 5.1.8 ga:mobileDeviceInfo
- 5.1.9 ga:mobileDeviceMarketingName
- 5.1.10 ga:deviceCategory
- 5.1.11 ga:browserSize
- 5.1.12 ga:dataSource
- 5.2 Metrics
- 5.1 Dimensions
- 6 Page Tracking
- 6.1 Dimensions
- 6.1.1 ga:hostname
- 6.1.2 ga:pagePath(サイトコンテンツへのパス)
- 6.1.3 ga:pagePathLevel1(サイトコンテンツへのパス(第1階層のみ))
- 6.1.4 ga:pagePathLevel2(サイトコンテンツへのパス(第2階層のみ))
- 6.1.5 ga:pagePathLevel3(サイトコンテンツへのパス(第3階層のみ))
- 6.1.6 ga:pagePathLevel4(サイトコンテンツへのパス(第4階層のみ))
- 6.1.7 ga:pageTitle (ページタイトル)
- 6.1.8 ga:landingPagePath (ランディングページのパス)
- 6.1.9 ga:secondPagePath
- 6.1.10 ga:exitPagePath
- 6.1.11 ga:previousPagePath
- 6.1.12 ga:pageDepth
- 6.2 Metrics
- 6.1 Dimensions
- 7 Time
- 7.1 Dimensions
- 7.1.1 ga:date (日付)
- 7.1.2 ga:year (年)
- 7.1.3 ga:month (月)
- 7.1.4 ga:week (週)
- 7.1.5 ga:day (日)
- 7.1.6 ga:hour (時)
- 7.1.7 ga:minute (分)
- 7.1.8 ga:nthMonth
- 7.1.9 ga:nthWeek
- 7.1.10 ga:nthDay
- 7.1.11 ga:nthMinute
- 7.1.12 ga:dayOfWeek
- 7.1.13 ga:dayOfWeekName
- 7.1.14 ga:dateHour
- 7.1.15 ga:yearMonth
- 7.1.16 ga:yearWeek
- 7.1.17 ga:isoWeek
- 7.1.18 ga:isoYear
- 7.1.19 ga:isoYearIsoWeek
- 7.1.20 ga:nthHour
- 7.2 Metrics
- 7.1 Dimensions
User
Dimensions
ga:userType
ga:sessionCount
ga:daysSinceLastSession
ga:userDefinedValue
Metrics
ga:users
ga:newUsers
ga:percentNewSessions
ga:1dayUsers
ga:7dayUsers
ga:14dayUsers
ga:30dayUsers
ga:sessionsPerUser
Session
Dimensions
ga:sessionDurationBucket
Metrics
ga:sessions (セッション数)
ga:bounces (直帰数)
ga:bounceRate (直帰率)
ga:sessionDuration
ga:avgSessionDuration
ga:hits
Traffic Sources
Dimensions
ga:referralPath(参照元サイトのパス)
/foo/bar.html
のように取得できますが、これだけだと何なのかちんぷんかんぷんですね。
ga:fullReferrer(参照元サイトのURL)
example.jp/foo/bar.html
のように取得できます。
yahoo,google,bing 等も取得してきてしまうことや、リファラスパムも取得してしまうので、以下のフィルタを掛けると純粋な形で取得できるかと思います。良い方法があれば教えて下さいm(_ _)m
filters:ga:fullReferrer!=(direct);ga:fullReferrer!=google;ga:fullReferrer!=yahoo;ga:fullReferrer!=bing;ga:fullReferrer!=goo.ne;ga:fullReferrer!=biglobe;ga:fullReferrer!=ask;ga:fullReferrer!=biglobe;ga:fullReferrer!=traffic2cash.xyz/;ga:fullReferrer!=share-buttons.xyz/;ga:fullReferrer!=traffic-cash.xyz/;ga:fullReferrer!=free-social-buttons.xyz/;ga:fullReferrer!=net-profits.xyz/;ga:fullReferrer!=web-revenue.xyz/;ga:fullReferrer!=free-traffic.xyz/;ga:fullReferrer!=с.новым.годом.рф/;ga:fullReferrer!=jp.hao123.com/yahoo-search-demo-sample;ga:fullReferrer!=social-widget.xyz/
ga:campaign
ga:source(参照元サイトのホスト名)
example.jp
のように取得できます。
ga:medium (参照元の媒体)
以下の様な情報を取得できます。
(none):ブックマーク等によるダイレクトアクセス
organic:検索エンジンからのアクセス
referral:外部サイトからのアクセス
cpc:CPC広告によるアクセス
【以下よくわからないパラメータです。ヘルプ!】
cpa、cpm、cpp、cpv、ppc
ga:sourceMedium(参照元サイトのホスト名と媒体)
以下の様な情報を取得できます。
google / organic
yahoo / organic
bing / organic
(direct) / (none)
example.com / referral
ga:keyword(検索キーワード)
「居酒屋 愛知」のような検索キーワードを取得できます。キーワードが設定されていない場合や提供されていない場合は【(not set)】や【(not provided)】を取得してしまうので以下のフィルタを掛けてあげると良いと思います。
filters:ga:keyword!=(not provided);ga:keyword!=(not set)
ga:adContent
ga:hasSocialSourceReferral
ga:campaignCode
Metrics
ga:organicSearches
Goal Conversions
Dimensions
ga:goalCompletionLocation
ga:goalPreviousStep1
ga:goalPreviousStep2
ga:goalPreviousStep3
Metrics
ga:goalXXStarts
ga:goalStartsAll
ga:goalXXCompletions
ga:goalCompletionsAll
ga:goalXXValue
ga:goalValueAll
ga:goalValuePerSession
ga:goalXXConversionRate
ga:goalConversionRateAll
ga:goalXXAbandons
ga:goalAbandonsAll
ga:goalXXAbandonRate
ga:goalAbandonRateAll
Platform or Device
Dimensions
ga:browser (ブラウザ)
ga:browserVersion (ブラウザバージョン)
ga:operatingSystem (OS[オペレーティング・システム])
ga:operatingSystemVersion (OSのバージョン)
ga:mobileDeviceBranding
ga:mobileDeviceModel
ga:mobileInputSelector
ga:mobileDeviceInfo
ga:mobileDeviceMarketingName
ga:deviceCategory
ga:browserSize
ga:dataSource
Metrics
None(メトリクス無し)
Page Tracking
Dimensions
ga:hostname
ga:pagePath(サイトコンテンツへのパス)
以下の様な情報が取得できます。GETパラメータもついてきますのでリファラスパムをフィルタで除外してあげる必要が有りそうです。
/index.html
/path/to/contents.html
/index.html?from=http://spam.example.com/
ga:pagePathLevel1(サイトコンテンツへのパス(第1階層のみ))
以下のようなサイトの第1階層にあるコンテンツへのパスが取得できます。ga:pagePathと同様にGETパラメータもついてきます。
/index.html
/aboutus/
/index.html?from=http://spam.example.com/
/company/
ga:pagePathLevel2(サイトコンテンツへのパス(第2階層のみ))
以下のようなサイトの第2階層にあるコンテンツ(http://example.com/●●/ココ.html)へのパスが取得できます。
/index.html
/hoge.html
ga:pagePathLevel3(サイトコンテンツへのパス(第3階層のみ))
ga:pagePathLevel2と同様に第3階層が取得できます。
ga:pagePathLevel4(サイトコンテンツへのパス(第4階層のみ))
ga:pagePathLevel2と同様に第4階層が取得できます。
ga:pageTitle (ページタイトル)
ページタイトルが取得できます。
ga:landingPagePath (ランディングページのパス)
/hogehoge/hogehoge.html のように取得できます。
サイトのトップページをランディングページから除外する処理は以下のように書きました。
filters:ga:landingPagePath==/,ga:landingPagePath==/index.html,ga:landingPagePath==/index.php
ga:secondPagePath
ga:exitPagePath
ga:previousPagePath
ga:pageDepth
Metrics
ga:pageValue
ga:entrances
ga:entranceRate
ga:pageviews
ga:pageviewsPerSession
ga:uniquePageviews
ga:timeOnPage
ga:avgTimeOnPage
ga:exits (離脱数)
ga:exitRate (離脱率)
Time
Dimensions
ga:date (日付)
ga:year (年)
ga:month (月)
ga:week (週)
ga:day (日)
ga:hour (時)
ga:minute (分)
ga:nthMonth
ga:nthWeek
ga:nthDay
ga:nthMinute
ga:dayOfWeek
ga:dayOfWeekName
ga:dateHour
ga:yearMonth
ga:yearWeek
ga:isoWeek
ga:isoYear
ga:isoYearIsoWeek
ga:nthHour
Metrics
None(メトリクス無し)
参照
https://developers.google.com/analytics/devguides/reporting/core/dimsmets