Authentication on local / non-public environments

Created on 1 June 2020, over 4 years ago
Updated 10 July 2023, over 1 year ago

I installed this module in a local environment and was having trouble authenticating with my GA account. I followed the instructions in the official README and created my OAuth credentials. For the "Authentication redirect url", I was forced to enter a placeholder public address as my site is hosted locally. Consequently, when the authentication process finishes, I was redirected to the placeholder site and the state of my site remains unauthenticated.

Took me a while but in the end the fix was simply to copy the ?code=4... bit after the redirected URL and paste it at the URL of your local site's authentication page, e.g. http://drupal.vm/admin/config/system/google-analytics-counter/authentication?code=4&the+rest+of+the+string. Then the authentication process will be complete and you can access your GA account.

I think it would be helpful to add this bit of information to the official set up guide as I believe there will be cases where this module would be set up in non-public environments.

πŸ’¬ Support request
Status

Closed: outdated

Component

Documentation

Created by

πŸ‡¬πŸ‡§United Kingdom lincolnh0

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024