Deploy search keywords to plausible ?
Anonymous
HOBBYOP

9 months ago

Hi guys,

I'm new to Railway and looking for guidance on how to deploy the tutorial for search keywords integration on my Plausible instance. I assume the process starts with SSH access to the instance?

Any tips or help would be greatly appreciated!

Here is the tutorial I'm referring to:
https://github.com/plausible/community-edition/wiki/google-integration

Thanks in advance!

Solved$10 Bounty

Pinned Solution

9 months ago

Hey, man

Since you didn't specify where in the tutorial you need help with, I'll try to address the whole thing assuming you have already set up OAuth and enabled the APIs for Google Search. If you haven't, I highly recommend you follow a YouTube tutorial on how to set up OAuth as it can be a long process.

Ok, so considering you did set up OAuth and enabled the APIs, here's what you gotta do:

  1. Open your Plausible project → “Add Service” → “Deploy from repo” and point it at
    https://github.com/plausible/community-edition (same repo you used for Plausible core).

  2. In services/search-keywords folder there’s a tiny Go app from the wiki. Deploy that as its own service (or copy the Dockerfile into a new Railway service).

  3. Set env vars on that service:
    PLAUSIBLE_API_BASE=https://<your-plausible-domain>/api
    PLAUSIBLE_SHARED_LINK=<your shared-link secret>
    GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET / GOOGLE_REFRESH_TOKEN (from the tutorial).

  4. In Plausible DB service add SEARCH_KEYWORDS_ENABLED=true.

  5. Railway → “Cron” → create a job that hits the keywords service endpoint every hour (e.g. https://keywords.<your-domain>.railway.app/run).

  6. Redeploy all services. The cron ping pulls GSC data and Plausible shows search keywords after a few hours.

Let me know if it does the job.

1 Replies

sarahkb125
EMPLOYEE

9 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open sarahkb125 9 months ago


9 months ago

Hey, man

Since you didn't specify where in the tutorial you need help with, I'll try to address the whole thing assuming you have already set up OAuth and enabled the APIs for Google Search. If you haven't, I highly recommend you follow a YouTube tutorial on how to set up OAuth as it can be a long process.

Ok, so considering you did set up OAuth and enabled the APIs, here's what you gotta do:

  1. Open your Plausible project → “Add Service” → “Deploy from repo” and point it at
    https://github.com/plausible/community-edition (same repo you used for Plausible core).

  2. In services/search-keywords folder there’s a tiny Go app from the wiki. Deploy that as its own service (or copy the Dockerfile into a new Railway service).

  3. Set env vars on that service:
    PLAUSIBLE_API_BASE=https://<your-plausible-domain>/api
    PLAUSIBLE_SHARED_LINK=<your shared-link secret>
    GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET / GOOGLE_REFRESH_TOKEN (from the tutorial).

  4. In Plausible DB service add SEARCH_KEYWORDS_ENABLED=true.

  5. Railway → “Cron” → create a job that hits the keywords service endpoint every hour (e.g. https://keywords.<your-domain>.railway.app/run).

  6. Redeploy all services. The cron ping pulls GSC data and Plausible shows search keywords after a few hours.

Let me know if it does the job.


Status changed to Solved chandrika 8 months ago


Loading...