简体   繁体   中英

Google Analytics Reporting api can't access any GA4 only Universal

When trying to pull GA4 data from the api, it says the user doesn't have permission. I'm having no issues with the UA accounts.

However, my GA4 accounts are both:

  1. tied to the same account as my Universal accounts
  2. the api service email account is also attached to those account.

I'm wondering if perhaps the property id isn't what i use for ga4, as I did for the Univsal code.

Has anyone had this issue?

I have tried using both the property ID, the Stream ID and the Measurement ID with no luck.

user doesn't have permission

means exactly that the user you are authenticating with does not have permission to access the google analytics account you are trying to access.

You need to go into the GA4 account via the admin section on the website and grant it access

Its under property and access management, add the service account in there.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM