Locking Analytics Account
-
@lauragoogleanalytics, we had previously begun discussing the possibility of locking the analytics account that could be used with the plugin, as agencies may have many accounts they are using in Google Analytics, but only want to give access to a client via the plugin to one.
Here’s what you had suggested:
Hello @smhcis,
When an app is authorized, it receives an access_token, which acts like a key to the entire account, including all profiles.
That access_token is then saved in the database, and used to communicate with Google’s API, to list the profiles or get their data (sessions, pages, etc.).
So, a WordPress user with administration privileges, will be able to read that key, and can use it to get the list of profiles and their data.
With that said, it makes no sense to ask the user to re-authorize, as the access_token they already have in the database, can access all data, so it’s just a false sense of security.
IMHO, if you are required to give the user administration privileges, then the best way to do it is the following ( I didn’t try it, but it should work ):
1 – From your Google analytics account, add the user to only a ‘view’ and restrict their access, as discussed here.
2 – After that, let the user authorize the app with their own email address, and not yours.
This way, the generated “access_token” will only have access to the restricted view, and nothing else.
Please feel free to correct me if I missed something.
Thanks,
Lara Support Team.The problem with that is that not all of my clients have a Google account nor do they WANT one. Most of my clients have no interest in messing with the settings of their website and wouldn’t even know they could change the plugin to show a different client’s information. However, that doesn’t make it a good practice.
I like the easy access this gives to analytic information and the fact that it requests so little in the way of permissions from my GA account, but I can’t in good consonance put this on a client site and leave all my other client information so unprotected.
- The topic ‘Locking Analytics Account’ is closed to new replies.