简体   繁体   English

BigQuery 中的 Google Analytics 站点搜索

[英]Google Analytics Site Search in BigQuery

I am currently trying to pull 1.000.000 different search queries in the next 12 months from a webshop in Google Analytics.我目前正尝试在未来 12 个月内从 Google Analytics 的网上商店中提取 1.000.000 个不同的搜索查询。 Since you only can show 5.000 queries per page and the loading times and the manual export in Excel files are very troublesome, I am searching for a solution via Google BigQuery.由于每页只能显示 5.000 个查询,加载时间和 Excel 文件中的手动导出非常麻烦,我正在通过 Google BigQuery 寻找解决方案。

So I activated "Google Analytics API" in the Google Cloud Platform and am stuck now.所以我在 Google Cloud Platform 中激活了“Google Analytics API”,现在卡住了。 Is there a fast and easy way to get a spreadsheet with the following?是否有一种快速简便的方法来获取包含以下内容的电子表格?

  1. Every single query每一个查询
  2. In the last 12 months在过去的 12 个月内
  3. From a specific data view从特定数据视图
  4. optional: export as Excel可选:导出为 Excel

I would very much appreciate your support that would save me hours and hours of manual exports.我非常感谢您的支持,这将节省我数小时的手动导出时间。

Cheers干杯

This feels like cheating, but if you need a simple solution that does not require programming or any setup, you can use the Google Analytics Query Explorer .这感觉像是作弊,但如果您需要一个不需要编程或任何设置的简单解决方案,您可以使用 Google Analytics查询资源管理器

This is a technology demo that demonstrates the use of the Google Analytics Reporting API, but it works well to get data from the analytics accounts that are connected to the Google Account your are logged in with in your browser.这是一个技术演示,演示了 Google Analytics Reporting API 的使用,但它可以很好地从连接到您在浏览器中登录的 Google 帐户的分析帐户中获取数据。

If you visit the sites you will see a number of dropdowns - the first three allow you to select an account/property/view (you need the view, the other options are just to filter down to view level).如果您访问这些站点,您将看到许多下拉列表 - 前三个允许您选择一个帐户/属性/视图(您需要该视图,其他选项只是过滤到视图级别)。

Then you can select a timeframe, metrics and dimensions.然后您可以选择时间范围、指标和维度。 You need to select a metric (since you plan to query a hit level dimension you probably want to use page views. You have to select a metric even if you do not plan to use it) and a dimension - the relevant dimension is "ga:searchKeyWord".您需要选择一个指标(因为您计划查询一个您可能想要使用页面浏览量的命中级别维度。即使您不打算使用它,您也必须选择一个指标)和一个维度 - 相关维度是“ga :searchKeyWord”。

Then you can click "run query", and download the result as tsv (tab separated values).然后您可以单击“运行查询”,并将结果下载为 tsv(制表符分隔值)。

The API will return 10 000 results per query, but unlike the Analytics interface, this is blazing fast, so even with manual paging by changing the start index (or by changing the timeframe) downloading 1 mio results will take only a few minutes. API 将为每个查询返回 10 000 个结果,但与 Analytics 界面不同,这非常快,因此即使通过更改开始索引(或更改时间范围)手动分页,下载 1 mio 结果也只需几分钟。

If you are doing this regularly, you probably want to run an API script and do this programmatically, but for a quick result the query explorer should do.如果您经常这样做,您可能希望运行 API 脚本并以编程方式执行此操作,但为了快速获得结果,查询资源管理器应该这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM