From 06217ed9d07eca4fbb78380b1f9d9229e5113786 Mon Sep 17 00:00:00 2001 From: Manuel Meurer Date: Tue, 23 May 2023 08:55:58 +0200 Subject: [PATCH] fix plausible --- app/views/layouts/application.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 9d8e522..c8c1846 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -23,7 +23,8 @@ = javascript_importmap_tags - if Rails.env.production? - = javascript_include_tag "/qwerty/js/script.js", defer: true, data: { domain: "railsbump.org", api: "/qwerty/api/event" } + -# Use the asset host for the API URL, since the Plausible Cloudflare worker doesn't run on railsbump.org but on assets.railsbump.org. + = javascript_include_tag "/qwerty/js/script.js", defer: true, data: { domain: "railsbump.org", api: asset_url("/qwerty/api/event") } %body{ class: page_classes } = render "shared/header"