1
我正在嘗試使用Google Analytics(分析)Core Reporting API來查詢某些過濾的會話數據。過濾器A返回結果,過濾器B返回結果,但應用過濾器A或B不返回任何結果。我錯過了什麼嗎?Google Analytics核心報告API;或自定義尺寸過濾器
過濾通過精確匹配一個自定義維度:
curl -X GET -H "Authorization: OAuth <redacted>"
"https://www.googleapis.com/analytics/v2.4/data
?ids=ga:<redacted>
&metrics=ga:sessions
&start-date=2014-06-01
&end-date=2016-05-25
&filters=ga:dimension1==MyMatchString"
返回
<dxp:aggregates>
<dxp:metric name="ga:sessions" type="integer" value="12345"/>
</dxp:aggregates>
過濾通過其他自定義尺寸與精確匹配:
curl -X GET -H "Authorization: OAuth <redacted>"
"https://www.googleapis.com/analytics/v2.4/data
?ids=ga:<redacted>
&metrics=ga:sessions
&start-date=2014-06-01
&end-date=2016-05-25
&filters=ga:dimension2==MyMatchString"
返回
但與具有精確匹配任何自定義維度
curl -X GET -H "Authorization: OAuth <redacted>"
"https://www.googleapis.com/analytics/v2.4/data
?ids=ga:<redacted>
&metrics=ga:sessions
&start-date=2014-06-01
&end-date=2016-05-25
&filters=ga:dimension1==MyMatchString,ga:dimension2==MyMatchString"
不返回任何結果過濾:
<dxp:aggregates>
<dxp:metric name="ga:sessions" type="integer" value="0"/>
</dxp:aggregates>
我也試圖與API的V3這些相同的請求,但有同樣的結果。
Web界面上的結果是否類似?另外嘗試設置'samplingLevel:HIGHER_PRECISION'。 –
@Kola設置'samplingLevel:HIGHER_PRECISION'沒有效果。通過網絡界面,你的意思是https://ga-dev-tools.appspot.com/query-explorer/?我無法使用它來測試此功能,因爲我不擁有Google Analytics帳戶來授權它 - 這是我們的客戶之一,我只有refresh_token。 – sleeper2173