Note: Currently Traffic Analytics features are behind a feature flag. For now, you'll need to enable it by following the steps below:
- Create a Tinybird account and a Tinybird workspace at tinybird.co. You can select any cloud/region you choose.
- Run
docker compose run --rm tinybird-loginto login to your Tinybird account following the steps given - Run
docker compose run --rm tinybird-sync. This will copy the Tinybird files from the Ghost container into a shared volume. The service should log "Tinybird files synced into shared volume.", then exit. - Run
docker compose run --rm tinybird-deployand wait for the service to exit successfully. This will create your Tinybird datasources, pipes and API endpoints. It may take a minute or two to complete the first time. You should see "Deployment #1 is live!" in your terminal before the service exits. - Run
docker compose run --rm tinybird-login get-tokens - Copy and paste the values from the previous step into your
.envfile - Run
docker compose --profile=analytics up -dto start all services in the background - Add
analyticstoCOMPOSE_PROFILES=in the top of your.envfile to automatically include theanalyticsprofile when runningdocker composecommands - At this point, everything should be working. You can test it's working by visiting your site's homepage, then checking the Stats page in Ghost Admin — you should see a view recorded.