开发者

Google Analytics API and Internal Search question

开发者 https://www.devze.com 2022-12-24 21:52 出处:网络
I\'m trying to use Google Analytics API to query internal searches that happen on my site. I\'d like to be able to query the keywords and the number of times that keyword was used in internal sear开发

I'm trying to use Google Analytics API to query internal searches that happen on my site.

I'd like to be able to query the keywords and the number of times that keyword was used in internal sear开发者_Go百科ch, based on URL of a page on the site. The idea is to find out which keywords direct the user to a particular page.

Does anyone know which dimensions and metrics must use to query that information?


The information you are talking about is in the "Site Search Terms" Report.

First, you need to set up Site Search. This is straightforward. A step-by-step explanation is on this GA Help Page.

Once you've done that, you just need to know how to access the Report.

  1. From the first page after GA login, select a Profile from the "View Reports" menu in the upper left-hand corner of the page

  2. On the left-hand side of the page (in the margin) click "Content" (the fourth item in the list of Dashboard pages) which will expand the items subsumed under the Content section

  3. "Site Search" will now appear in the margin below "Content"

  4. Click "Site Search"; the Report will have three tabs: (i) Site Search Usage; (ii) Goal Conversion; and (iii) Ecommerce. Obviously, most of the information you are interested in is in the first tab.


Once the search tracking is set up as per doug's answer, the dimension is ga:searchKeyword, and the metric you need is ga:searchUniques (and you probably want to sort by -ga:searchUniques). I've checked this against the GA web report & it matches up - the documentation in the GA API Query Explorer isn't really clear on what the ga:searchUniques really counts.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号