abjerner / Skybrud.Umbraco.Analytics

Umbraco content app with statistics from Google Analytics.
MIT License
11 stars 3 forks source link

Refresh Token #5

Closed No1sBothered closed 3 years ago

No1sBothered commented 3 years ago

The documentation says:

Besides obtaining the OAuth credentials as described above, you'll also need to get a refresh token for your Google user, as well as the ID of the Analytics profile matching your site.

And from what i can tell that refresh token is manually added to the app settings

<add key="SkybrudAnalytics.GoogleRefreshToken" value="Your refresh token" />

Where does a google user find the refresh token, this process is not detailed in the documentation or described by google?

abjerner commented 3 years ago

Hi @markcasepilot,

When going for the single-site approach, it's assumed that you have this information for somewhere else. The thought with the single-site approach was that it might be a bit easier to set up - if you already had the necessary information. The same paragraph your quoted text is from, also suggests using the multi-site approach instead (it may still be used even if you only have a single site).

The multi-site approach on the other hand let's you enter information about your Google app/project, and then authenticate using your Google account. When you've successfully authenticated with Google this way, the refresh token will be saved in Umbraco for future use.

If you still wish to use the single-site approach, you can use the underlying Skybrud.Social.Google and Skybrud.Social.Google.Analytics packages to set up your own authenticated. You can find a bit of information about that here:

https://social.skybrud.dk/google/authentication/

Hope that helps 😉

No1sBothered commented 3 years ago

Thanks

I took the multi-site approach and it all worked fine, nice work!

Thanks again