Google分析“获取配置文件”不允许我选择我的帐户

时间:2022-02-18 15:17:31

I've a working google analytics integration done from the latest v4 documentation. Where we need to GET A CONFIGURATION FILE from here

我从最新的v4文档中完成了一个有效的谷歌分析集成。我们需要从这里获取配置文件

But facing the following issue

但面临以下问题

I've two different tracking id for two separate apps on my google analytics account. For first app I got the google-services.json file which I placed inside the root directory and everything is working fine.

我在Google Analytics分析帐户中为两个单独的应用程序提供了两个不同的跟踪ID。对于第一个应用程序,我得到了google-services.json文件,我放在根目录中,一切正常。

When I follow the steps to create the google-services.json for second app it doesn't let me to switch my account (see the attached pic - it takes the first account from my google analytics)

当我按照步骤为第二个应用程序创建google-services.json时,它不允许我切换我的帐户(请参阅随附的图片 - 它需要我的谷歌分析中的第一个帐户)

How I should create a separate google-services.json file for separate property id?

我应该如何为单独的属性ID创建单独的google-services.json文件?

Google分析“获取配置文件”不允许我选择我的帐户

1 个解决方案

#1


3  

From what is said on this site by Google, you can modify the json file from your first account with the property Id you want to use. Here is their answer:

根据Google在本网站上的说法,您可以使用您要使用的属性ID从您的第一个帐户修改json文件。这是他们的答案:

This is currently working as intended even though it may not seem so. There may be an update to fix this but in the meantime you can just copy an existing Configuration file and edit it. The only thing you need to change is the Analytics tracking ID value.

这目前正在按预期工作,即使它似乎不是这样。可能有更新可以解决此问题,但在此期间您只需复制现有的配置文件并进行编辑即可。您需要更改的唯一内容是Google Analytics跟踪ID值。

For example, in the configuration JOSN file you'll see an entry like: "services": { "analytics_service": { "status": 2, "analytics_property": { "tracking_id": "UA-XXXXX-YY" } },

例如,在配置JOSN文件中,您将看到如下条目:“services”:{“analytics_service”:{“status”:2,“analytics_property”:{“tracking_id”:“UA-XXXXX-YY”}} ,

Replace the UA-XXXXX-YY value with the property ID (for the GA Account) you want to use. You can use the Account Explorer to find the correct property ID: https://ga-dev-tools.appspot.com/account-explorer/

将UA-XXXXX-YY值替换为您要使用的属性ID(对于GA帐户)。您可以使用帐户资源管理器查找正确的属性ID:https://ga-dev-tools.appspot.com/account-explorer/

Note that Tracking ID and Property ID mean the same thing.

请注意,跟踪ID和属性ID意味着相同的事情。

Hope this helps!

希望这可以帮助!

#1


3  

From what is said on this site by Google, you can modify the json file from your first account with the property Id you want to use. Here is their answer:

根据Google在本网站上的说法,您可以使用您要使用的属性ID从您的第一个帐户修改json文件。这是他们的答案:

This is currently working as intended even though it may not seem so. There may be an update to fix this but in the meantime you can just copy an existing Configuration file and edit it. The only thing you need to change is the Analytics tracking ID value.

这目前正在按预期工作,即使它似乎不是这样。可能有更新可以解决此问题,但在此期间您只需复制现有的配置文件并进行编辑即可。您需要更改的唯一内容是Google Analytics跟踪ID值。

For example, in the configuration JOSN file you'll see an entry like: "services": { "analytics_service": { "status": 2, "analytics_property": { "tracking_id": "UA-XXXXX-YY" } },

例如,在配置JOSN文件中,您将看到如下条目:“services”:{“analytics_service”:{“status”:2,“analytics_property”:{“tracking_id”:“UA-XXXXX-YY”}} ,

Replace the UA-XXXXX-YY value with the property ID (for the GA Account) you want to use. You can use the Account Explorer to find the correct property ID: https://ga-dev-tools.appspot.com/account-explorer/

将UA-XXXXX-YY值替换为您要使用的属性ID(对于GA帐户)。您可以使用帐户资源管理器查找正确的属性ID:https://ga-dev-tools.appspot.com/account-explorer/

Note that Tracking ID and Property ID mean the same thing.

请注意,跟踪ID和属性ID意味着相同的事情。

Hope this helps!

希望这可以帮助!