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!
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:
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).In
services/search-keywordsfolder there’s a tiny Go app from the wiki. Deploy that as its own service (or copy theDockerfileinto a new Railway service).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).In Plausible DB service add
SEARCH_KEYWORDS_ENABLED=true.Railway → “Cron” → create a job that hits the keywords service endpoint every hour (e.g.
https://keywords.<your-domain>.railway.app/run).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
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:
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).In
services/search-keywordsfolder there’s a tiny Go app from the wiki. Deploy that as its own service (or copy theDockerfileinto a new Railway service).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).In Plausible DB service add
SEARCH_KEYWORDS_ENABLED=true.Railway → “Cron” → create a job that hits the keywords service endpoint every hour (e.g.
https://keywords.<your-domain>.railway.app/run).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