Can’t select a different Google Analytics account

2019-03-09 22:22发布

问题:

I have two Google Analytics accounts A and B, each with their own properties which I am attempting to generate configuration files for (more specifically, google-services.json files) in order to use Google Analytics with my Android app. I'm using the Enable Google Services for your app wizard.

When you reach the Choose and configure services step, it should allow you to choose both a Google Analytics account and an Analytics Property from their associated selection boxes every time you run this wizard. The problem is that the selection box for choosing a Google Analytics Account only appears on the first run of this wizard, and afterwards becomes a pre-filled field that cannot be modified.

This means that if I generate a configuration file for a Property using Account A, I cannot generate another configuration file for a Property using Account B since the wizard pre-fills a non-modifiable text box with Account A, and only Account A's Properties appear in the next selection box.

How can I generate a google-services.json configuration file for a Property under a Google Analytics Account I cannot switch to?

I have admin access to both of these accounts, so this is not an issue.

The configuration file is necessary for Google Analytics to work once the app is released to the public (as described here).

Similar unsolved questions have been asked here for Android and here for iOS (both platforms use the same wizard to enable the Google Analytics service).

回答1:

Managed to figure out a very simple workaround to solve my own question: remove yourself from the account you're stuck on, so the wizard is then forced to let you choose another account.

To achieve this:

  • Log into Google Analytics and choose the Admin tab.
  • In the ACCOUNT column, from the drop-down box, choose the account you were bound to (in the Enable Google Services wizard).
  • In the same column, choose User management.
  • Click the Remove myself from this account button.

Then go back to the Enable Google Services wizard again and you should now be able to select another account.

I hope this helps others at least until Google fixes the site, as this was a rather annoying problem to solve!



回答2:

I figure out the solution for this issue is that we can move the account to trash. After we create an config file, restore the account.

Hope this may help



回答3:

On this page Google staff gave an answer to this bug:

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.

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" } },

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/

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