WordPress.org

Forums

Google Analytics Post Pageviews
[resolved] Error: redirect_uri_mismatch (11 posts)

  1. Jordy Meow
    Member
    Plugin Author

    Posted 1 year ago #

    I can never get the plugin to access the Google API even though I did everything for it. Tried a few different things to make sure I am not making mistakes but it's really not going through this "Connect to Google Analytics".

    Just to make sure: is the author reading this forum? Does the plugin still work as of today?

    Thank you!

    https://wordpress.org/plugins/google-analytics-post-pageviews/

  2. maximevalette
    Member
    Plugin Author

    Posted 1 year ago #

    Just tried it and it still working fine for me. Can you explain your issue?

  3. Jordy Meow
    Member
    Plugin Author

    Posted 1 year ago #

    In the API Console, under "APIs & auth" -> "Credentials", I have created a Client ID for Web application. Of course, I made sure that the redirect URI is the same as the one mentioned in the plugin (and is also the same as the one sent as a parameter later). I am pretty sure everything is set up properly on the plugin side, Project Number and Client secret.

    Under "APIs" in the Google Console, I also enabled "Analytics API" which is OFF by default. Just to make sure :)

    Then when I click on "Connect on Google Analytics", it just shows me a 400 error page from Google with "Error: redirect_uri_mismatch".

    I am not sure at all how to debug this at all, if you have some pointer I could look a bit more into it.

  4. maximevalette
    Member
    Plugin Author

    Posted 1 year ago #

    I think I found why the redirect_uri was a mismatch. I used the plugin's filename for the slug (that's the default value) but sometimes when you install the plugin you have a different filename.

    I changed that, it should work now (version 1.1). I also changed some texts to match the new Google API Console :)

  5. Jordy Meow
    Member
    Plugin Author

    Posted 1 year ago #

    Actually I really checked the redirect_uri with the actual callback uri and it was perfect before already. I upgraded to the new version but it still doesn't work, still the same error. Not sure what's happening...

    I tried the plugin on another website (changing the redirect_uri too of course) but exactly the same issue...

    On your side, when you tried again, did you uninstalled and reinstalled the plugin from scratch?

    I have the Analytics API enabled, do I need anything else enabled?

    I just really tried many things and triple-checked everything, I am even working on an app where I am using Google OAuth myself and it's working fine (however, I am not using the same way as you do). I have no idea what's going wrong here...

  6. maximevalette
    Member
    Plugin Author

    Posted 1 year ago #

    On your side, when you tried again, did you uninstalled and reinstalled the plugin from scratch?

    Yes, I deleted all the files before trying. It's working.

    I have the Analytics API enabled, do I need anything else enabled?

    Nope.

    Can you contact me directly so we can debug that in private? I don't think there's an issue with the plugin.

  7. Jordy Meow
    Member
    Plugin Author

    Posted 1 year ago #

    Alright :) I have just sent you an email.

  8. RiseOfLex88
    Member
    Posted 1 year ago #

    Hi Guys, Was there an an answer to this? I'm getting the same issue.

    I'm assuming it has something to do with the redirect URI settings within the Analytics API?

  9. maximevalette
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Yes, I updated the plugin just after to fix the issue — it was due to Google's new API keys system. Your problem is probably different.

    Did you double check your settings on the API Console and on the plugin?

  10. meschiany
    Member
    Posted 11 months ago #

    Hey guys,
    I have been looking for this plugin for weeks.
    What is the correct redirect_uri that i suppose to put in the developer console?

    for example, if my domain is example.com

    thanks

  11. maximevalette
    Member
    Plugin Author

    Posted 11 months ago #

    @meschiany: The Redirect URI is written in the settings instructions.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google Analytics Post Pageviews
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.