将Google Analytics集成到Google文档中(Integrating Google Analytics Into Google Doc)

编程入门 行业动态 更新时间:2024-10-26 22:21:57
将Google Analytics集成到Google文档中(Integrating Google Analytics Into Google Doc)

我正在尝试从谷歌分析中提取数据并将其放入谷歌doc电子表格中。 主要问题似乎是我无法输入我的GA Key。 所有教程都说要在文本框中输入它,该文本框应该位于resources -> use的末尾resources -> use Google API表单。 但我看到没有文本框,只有一条消息,我必须启用API控制台中的API才能使用它们。

我已确认我在API控制台中启用了Google Analytics。

我得到的错误消息是User does not have sufficient permissions for this profile. 如果我尝试在“分析”文本框中键入我的API密钥(这使我相信定义变量图像),则Analytics not defined或Analytics not defined 。

I'm trying to pull data from a google analytics and put it into a google doc spreadsheet. The main issues seems to be I can't enter my GA Key. All the tutorials have said to enter it in a text box that should be at the end of the resources -> use Google API form. But I see no textbox there, only a message that I have to enable the APIs in the API console to use them.

I've confirmed that I do have Google Analytics enabled in the API console.

The error messages I get are either User does not have sufficient permissions for this profile. or Analytics not defined if I try to type my API key in the text box that says 'Analytics' (which leads me to believe that's defining the variable image).

最满意答案

由于脚本以“您”身份运行,因此您无需输入GA ID - 它将使用您在创建和授权该脚本时登录的帐户的权限。 该帐户需要您要查询的Google Analytics帐户的管理员权限。

您认为用于API密钥的框保存脚本中分析对象的名称。 如果您更改了,则需要将脚本中“Analytics”的所有实例更改为您输入的名称。

例如,脚本中有一行:

var accounts = Analytics.Management.Accounts.list();

这将列出连接到授权该脚本的用户的所有帐户。 您看到第一部分是“Analytics”(脚本中的全局Google Analytics对象),如果您在资源 - > Google API标签中输入内容,您也需要更改它 - 这就是您收到错误消息的原因“当您更改该值时,不会定义分析。

很难说出你的实际问题,可能你只是缺少分析中的管理员权限。

Since the script is running as "you" you do not need to enter the GA id - it will use the permissions for the account that you were logged in with while creating and authorising that script. That account needs admin permissions for the Google Analytics account you intend to query.

The box that you thought is for the API key holds the name for the analytics object in the script. If you change that you'd need to change all instances of "Analytics" in the script to the name you entered.

For example there is a line in the script that goes:

var accounts = Analytics.Management.Accounts.list();

This will list all accounts connected to the user who authorised that script. You see that the first part is "Analytics" (the global Analytics object in the script), if you enter something in the resources->Google APIs tab you'd need to change that as well - that's why you get an error message "Analytics is not defined" when you change that value.

Hard to tell about your actual problem, probably you are just missing admin permissions in analytics.

更多推荐

API,Analytics,电脑培训,计算机培训,IT培训"/> <meta name="description&quo

本文发布于:2023-08-06 19:11:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1455432.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文档   Analytics   Google   Integrating   Doc

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!