Google Analytics 4 Authentication

Hello!

I’ve used the Google Analytics UA module for many months now. That module allows me to authenticate to Google as part of the Connection, but then has the “View ID” as a separate field from the authentication. This allows me to pass in a view ID as I extract data from multiple websites (hundreds of sites). Each site has a unique view ID, but I only have to have a single authentication to get to all of them.

The new Analytics GA4 module seems to bundle the Authentication with the View ID. It seems to force me to authenticate to an individual Property ID instead authenticating with Google and then providing the property ID in the rest of the config. A major issue if you are trying to support multiple sites with the same scenario.

Does anyone know of any workarounds that would allow me to still authenticate, but then pass in a View ID (or Property ID)?..Otherwise, I think I will have to duplicate my GA4 integrations hundreds of times to capture all of the websites we support individually.

Analytics UA config
image

Analytics GA4 config (View ID is bundled into the config settings)

Hi Matt,

Looks like this isn’t an ideal approach as you need to authenticate several times. I’d suggest reaching out to their support team about this matter. Might try to use their HTTP Make an Oauth 2.0 request module to achieve this flow.

2 Likes

@Jogger_Meister Thank you for the response. Yes, I have been trying to get the HTTP module to work as well, but running into authentication issues with it too. I have been chatting extensively with support over the last few days. I’ll repost our fix here once we get it figured out.

Thanks!
Matt

1 Like

For those interested in the workaround. You can create a “Make API Call” in GA4 that will hold a single authentication and still allow you to enter a property ID dynamically. The trick is to authenticate using any property ID that you have the appropriate permissions for. From there, you can enter the property ID into the “URL” field directly as shown here. Replace the blacked out property ID with your dynamic property ID (or a manually entered one if you prefer) and it works!

From there you have to manually enter your API call (not ideal for me) into the “Body” field. Example

Hope this helps

3 Likes

Hello @Matt_Lane :wave:

I just want to quickly say great work figuring out this workaround :clap:

Thank you very much for sharing it here with the rest of the community. I’m confident it will be incredibly useful to many others seeking similar information. :pray:

2 Likes