Google & Twitter integration when self-hosting

I recently installed Plausible on my own server and I’m loving it so far!

Is there a way to enable the Google and Twitter integrations when self-hosting? I.e. fetching Google queries that led people to my site, and fetching the tweets that link to it?

Sounds great!

It doesn’t work for you or?

Twitter integration is automated while you can follow this Google Search Console integration as documented here: https://docs.plausible.io/google-search-console-integration/

You can see an example on our live demo: https://plausible.io/plausible.io?period=30d&source=Google

No, it doesn’t seem to work out of the box when self hosting. For example, when attempting to set up the Google integration you get the following error:

Error 400: redirect_uri_mismatch
The redirect URI in the request, https://plausible.my.domain/auth/google/callback, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: https://console.developers.google.com/apis/credentials/oauthclient/${your_client_id}?project=${your_project_number}

When viewing the Twitter Referrer drilldown on the public plausible.io stats, you see the tweets that linked to the page. This doesn’t happen on my instance. I’m guessing I need to configure a Twitter API key, but this isn’t documented anywhere as far as I can tell.

1 Like

One Plausible user has now contributed with instructions on how to enable Search Console on Self-Hosted. Take a look here: https://docs.plausible.io/self-hosting-configuration#google-search-integration

1 Like

Amazing; that works great! Thank you!

I’ve applied for a Twitter API key; if I can get the Twitter integration to work I’ll submit a similar PR to the docs.

1 Like

that would be great, thank you!

For anyone following along, I opened a PR with docs here: https://github.com/plausible/docs/pull/28

1 Like