From eb7e48e5b7c47c3c31f488fa1185cadaf29bacf5 Mon Sep 17 00:00:00 2001 From: Duncan Mackenzie Date: Sat, 25 May 2024 16:14:10 -0700 Subject: [PATCH] Hide analytics pixel for tests --- tests/screenshot.css | 4 ++++ .../hello-friend-ng/layouts/partials/homegrown-analytics.html | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/screenshot.css b/tests/screenshot.css index 230018cd..825b8ac7 100644 --- a/tests/screenshot.css +++ b/tests/screenshot.css @@ -1,3 +1,7 @@ .gitinfo { display: none; +} + +img.analytics-pixel { + display: none; } \ No newline at end of file diff --git a/themes/hello-friend-ng/layouts/partials/homegrown-analytics.html b/themes/hello-friend-ng/layouts/partials/homegrown-analytics.html index 0934db41..38db5605 100644 --- a/themes/hello-friend-ng/layouts/partials/homegrown-analytics.html +++ b/themes/hello-friend-ng/layouts/partials/homegrown-analytics.html @@ -1,6 +1,6 @@ {{- $rootPath := .Site.Params.homegrownAnalytics }}
@@ -10,6 +10,7 @@ img.src = "{{ $rootPath }}&page={{ .RelPermalink }}&title={{ .Title }}&js_enabled"; img.height = "1"; img.width = "1"; + img.className="analytics-pixel"; if (referrer) { img.src += "&referrer=" + encodeURIComponent(referrer); }