使用 Power BI 连接到 Google AnalyticsConnect to Google Analytics with Power BI

要通过 Power BI 连接到 Google Analytics,需首先连接到 Google Analytics 帐户。Connecting to Google Analytics through Power BI starts by connecting to your Google Analytics account. 你将获得一个 Power BI 仪表板和一组 Power BI 报表,这些报表会提供网站流量和用户维度的相关见解。You will get a Power BI dashboard and a set of Power BI reports that provide insights about your site traffic and user dimensions. 可以与仪表板和报表进行交互,但不能保存更改。You can interact with the dashboard and reports, but you can't save changes. 此数据将每天自动刷新一次。The data will be refreshed automatically once per day.

连接到适用于 Power BI 的 Google AnalyticsConnect to Google Analytics for Power BI. 阅读有关使用 Power BI 进行 Google Analytics 集成的详细信息。Read more about the Google Analytics integration with Power BI.

可以从 Power BI Desktop 中的 Google Analytics 连接器开始创建自定义仪表板和报表。You can create customized dashboards and reports by starting from the Google Analytics connector in Power BI Desktop. 只需连接 Google Analytics 帐户,然后就可以创建可以发布到 Power BI 服务的自定义报表。Just connect with your Google Analytics account and create your custom reports, which you can publish to the Power BI service.

如何连接How to connect

  1. 选择左侧导航窗格中的“应用”,然后选择右上角的“获取应用”。Select Apps in the left navigation pane > select Get apps in the upper-right corner.

    “获取应用”图标

  2. 在 AppSource 中,选择“应用”选项卡,然后搜索所需的服务。In AppSource, select the Apps tab, and search for the service you want.

    AppSource 中的“应用”选项卡

  1. 依次选择“Google Analytics”>“获取”。Select Google Analytics > Get.

  2. 出现提示时,输入 Google Analytics 凭据。When prompted, enter your Google Analytics credentials. 选择“oAuth 2”作为身份验证机制,然后单击“登录”。Select oAuth 2 as the Authentication Mechanism and click Sign In. 按照 Google 身份验证流进行操作。如果你配置了双因素身份验证,则其中可能包括双因素身份验证。Follow the Google authentication flow, which may include 2-factor authentication if you have it configured.

  3. 单击“接受”以允许 Power BI 访问你的 Google Analytics 数据。Click Accept to allow Power BI to access your Google Analytics data.

  4. Power BI 连接到特定的 Google Analytics 视图。Power BI connects to a specific Google Analytics View. 选择想要连接到的帐户名称、属性名称和视图名称。Select the account name, property name and view name you’d like to connect to. 此信息可在 Google Analytics 帐户的左上方或“主页”选项卡上获取。请参阅以下详细信息。This information can be found in your Google Analytics account, either in the top left or on the Home tab. See details below.

  5. 单击“连接”以开始导入过程。Click Connect to begin the import process.

查看 Google Analytics 仪表板和报表View the Google Analytics dashboard and reports

导入完成后,新的应用将显示在“应用”页上。When the import is complete, the new app will appear on the Apps page.

  1. 选择左侧导航窗格中的“应用”,然后选择应用。Select Apps in the left navigation pane > select the app.

    左侧导航窗格中的“应用”

  2. 可以通过在问答框中键入来提出问题,或单击磁贴打开基础报表。You can ask a question by typing in the Q&A box, or click a tile to open the underlying report.
  ![](media/service-connect-to-google-analytics/googleanalytics2.png)

下一步?What now?

  • 在仪表板顶部,尝试在“问答”框中提问Try asking a question in the Q&A box at the top of the dashboard.
  • 选择磁贴以打开基础报表。Select a tile to open the underlying report.
  • 可以筛选和突出显示报表中的数据,但不能保存所做的更改。You can filter and highlight the data in the report, but you can't save your changes.
  • 计划每日刷新数据集。Your dataset is scheduled to refreshed daily. 可以更改刷新计划或根据需要使用“立即刷新”来尝试刷新。You can change the refresh schedule or try refreshing it on demand using Refresh Now.

系统要求System requirements

若要从 Power BI 连接,需要具有 Google Analytics 帐户。To connect from Power BI, you need to have a Google Analytics account. 未连接到 Google Analytics 帐户的其他 Google 帐户将会出现身份验证错误。Other Google accounts that do not have a Google Analytics account connected to it will see an authentication error.

故障排除Troubleshooting

凭据 如果你有多个 Google 帐户,连接时请使用匿名或私密浏览器窗口以确保你使用的是正确帐户。Credentials If you have multiple Google accounts, please use an incognito or an in-private broswer window during connection to ensure the correct account is used.

如果你可以登录 Google,但却收到了显示你的凭据无效的错误消息,请确认你具有 Google Analytics 帐户。If you're getting an error indicating your credentials are invalid however you were able to sign into Google, please confirm you have a Google Analytics account.

参数 参数目前必须具有唯一的名称。Parameters Unique names are currently required for the parameters. 如果你看到显示所选值已重复的错误消息,请选择其他值或在 Google Analytics 中更改名称使其是唯一的。If you see an error indicating the value you selected is duplicated, please select another value or change the names in Google Analytics to make them unique. 对此我们正在进行积极改进。We're actively working to improve this.

备注

参数区分大小写。Parameters are case-sensitive. 输入与在 Google Analytics 帐户中显示的完全相同的参数。Enter them exactly as they appear in your Google Analytics account.

还有问题?Still having issues? 打开支持票证以联系 Power BI 团队:Open a support ticket to reach the Power BI team:

  • 在 Power BI 应用程序中依次选择“问号”>“联系支持人员”。While in the Power BI app, select the question mark > Contact Support.
  • 从 Power BI 技术支持网站(即你正在阅读此文章的地方)中选择页面右侧的联系支持人员From the Power BI Support site (where you're reading this article), select Contact Support on the right side of the page.

后续步骤Next steps