26

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).

Community
  • 1
  • 1
Cameron Harvey
  • 421
  • 4
  • 8

3 Answers3

16

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!

Cameron Harvey
  • 421
  • 4
  • 8
  • I am the owner of the analytics account and cannot remove myself.. what should I doooo? :S – Phil Hudson Mar 05 '16 at 13:51
  • 1
    I found it easier to just generate it with the wrong account and manually modify the generated plist file. – Phil Hudson Mar 06 '16 at 11:03
  • The problem still exist until this date... I wonder why is this not fixed. To be noted, if you remove yourself from the account, your account will vanish from the google analytic dashboard. – HendraWD Jun 07 '16 at 07:50
  • Any workaround for this yet? I am stuck here as I am the owner of the analytics account. I want to change the Analytics Property while getting the configuration file. How do i achieve this? – Shruti Dasgopal Jun 07 '16 at 09:48
  • any solution to this yet ? I'm having the same issue for an iOS app – DrPatience Jun 07 '16 at 13:02
  • 2
    And here we are, half a year later and stuck with this issue, tried both iOS and Android and it's exactly as you describe. It's frustrating how slow Google fixes their own bugs – Rodrigo Jun 20 '16 at 18:04
5

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

LuongTruong
  • 1,513
  • 1
  • 20
  • 37
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.

SDW
  • 1,780
  • 4
  • 14
  • 28