ScriptError: Authorization is required to perform that action.

10,216 views
Skip to first unread message

ma...@leadhub.net

unread,
Feb 25, 2019, 6:13:28 PM2/25/19
to google-analytics-spreadsheet-add-on
Hi!
I'm trying to create a report and regardless of the metrics, dimensions and segments I use I get the error: ScriptError: Authorization is required to perform that action.

Am I missing something?

Thanks!

James Corr

unread,
Feb 26, 2019, 12:56:55 PM2/26/19
to google-analytics-spreadsheet-add-on
Hi, 

Easy to mess this up, simple to fix. This means that Google Account you're logged in to while running the Add On doesn't have the authorization to view the GA View you're trying to query. Open the Google Spreadsheet using an account that has access to your GA data and this will run fine! 

-James

Josh Moore

unread,
Feb 28, 2019, 6:46:30 PM2/28/19
to google-analytics-spreadsheet-add-on
We were getting the exact same error on all of our reports.  They used to work but now we kept hitting the "authorization is required to perform this action" error - even though we were definitely logged in as the correct user.  So that wasn't what the problem was.  We even tried opening an incognito window and running the reports and we still got the same error.

We have eventually found a work-around.  It turns out the problem is related to having multiple Google Accounts logged in, and then the Analytics plugin messes up when connecting.

To get around this, in Chrome, open up a new profile in Chrome. So click your user icon in the top right on the browser (just beside the three dots menu), and choose "Open Guest Window".

Then log back into Google Drive and run the reports. It should now work.

Josh 

James Corr

unread,
Feb 28, 2019, 7:14:34 PM2/28/19
to Josh Moore, google-analytics-spreadsheet-add-on
For things like this where you're authenticating an account and letting it run by itself or use the account frequently I'd really really recommend staying away from having multiple accounts signed into the same Chrome User if possible. Issues like this happen and can be hard to debug. Alternatively I'd recommend setting up separate Chrome Users altogether. While not super clear, details are in this help article, but the gist of it is instead of clicking "Open Guest Window" I would click the same icon in the Chrome bar > Manage People > Add New Person and sign in there creating a new Chrome User. 

--
You received this message because you are subscribed to a topic in the Google Groups "google-analytics-spreadsheet-add-on" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-analytics-spreadsheet-add-on/sarnUsi3KdI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-analytics-spread...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-analytics-spreadsheet-add-on/541daa66-e90f-4d52-a22d-3f460a9df704%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--



James Corr
Analytics Team Lead
Jam...@SeerInteractive.com
Seer Interactive
I welcome VSRE emails. Learn more at vsre.info

inJames Corr 

1200 F Street
San Diego, CA, 92101

Message has been deleted

Nick Fenwick

unread,
May 2, 2023, 3:16:18 AM5/2/23
to google-analytics-spreadsheet-add-on
Thanks for this tip Josh! I was having this problem with the "GA4 Migrator for Universal Analytics".  Turns out I was logged on both as the analytics account owner (which was visible at the top right bubble on google sheets) but also one of our other work gmail accounts.  A quick way to fix this without needing a Guest Window is to go to https://accounts.google.com/ and click the account bubble at the top right, then 'Sign out of all accounts' at the bottom of the list.  This will sign out of all accounts, so you can go back to Sheets, log in as the correct account, and it'll be the only account you're logged on as, and the script is able to connect successfully without confusion.

Nick
Reply all
Reply to author
Forward
0 new messages