Use Case: Allow user to Connect their Google Analytics and display data

Hi everyone,

I’m new here and I love a good challenge - so I’m building an application and I’m on good way, however, I have a hinder which I’m struggling with. I have noticed that there is not too much YouTube videos, documentation and such which is what I’ve always used when I’m stuck, so I’m trying the community forum for the first time.

I have a page in the web application that looks like this. The idea is that when the user clicks a button called “Connect Integration”.

They will end up on a page like this (I have already setup everything in Google and it works well, so no help needed here).

They will then be redirected back to the application and see the data in the graphs etc.

You have probably all seen or done this before, as it’s common to do in applications. So I’m hoping I can get some detailed help on how to recreate this - I think it will add value to the community as this is non-existent anywhere!

I’m struggling to understand if this is something I can or should use any of the Google Int API from Xano (which is my backend) or if I should do more actions in the frontend.

Happy to get all the input and learning I can, thank you! PS: If I get a really good answer, I’ll share what I’m creating - with ZERO coding experience!

1 Like

:slight_smile: appreciate any help I can get!:slight_smile:

once the user is sent back to the app, you need to exchange the code paramter https://example.com/redirect_page?code=lij23l4ji2lk4j2&state=some%20string’s from the url for an access token. Once the token is available, you can call the endpoints from GA and throw the access token in the Authorization header.

Hi jared,

Thanks for taking the time to explain. This seems like it might be missing a part, as I assume the refresh/access token should be stored somewhere? How is this done?

From what I read the user would need to connect every time they log in. How would I in that case get the access token dynamically in the Auth Header, I assume the access token changes every x.

Hi @erikm3103 :wave:

Here’s a video that explains how to setup Google login with Xano and WeWeb. I don’t think it covers your exact use case but you might find it helpful regardless as it covers a few OAuth basics.

When we did the live stream, I personally found the section where Q explains how Google & WeWeb communicate super helpful (at 28:30) because it’s applicable to any provider and any frontend but I’d recommend taking the time to watch everything from 12:48 onwards to get the full context.

Let me know if it helps!

1 Like

Hi @erikm3103, I would also like to integrate YouTube/Google Analytics, so I am wondering if you were able to find a solution to this? Would love to chat and see if there is any way we can collaborate :slight_smile:

Hi Bravo,

I never actuallly implemented this as it was not needed anymore. However, now that I’ve used WeWeb for some time, I belive the process is very similar to how you would setup a reset password flow in terms of the token in a query etc.

I think it might be some good videos on YouTube where people do the whole process with Bubble, might be helpful:)

1 Like

Anything with an REST API can be implemented.

1 Like