Skip to content

Commit

Permalink
Hide analytics pixel for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncanma committed May 25, 2024
1 parent fe7ffbe commit eb7e48e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/screenshot.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.gitinfo {
display: none;
}

img.analytics-pixel {
display: none;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- $rootPath := .Site.Params.homegrownAnalytics }}
<noscript>
<img src="{{ $rootPath }}&page={{ .RelPermalink }}&title={{ .Title }}" height="1" width="1">
<img class="analytics-pixel" src="{{ $rootPath }}&page={{ .RelPermalink }}&title={{ .Title }}" height="1" width="1">
</noscript>
<div id="analytics">
</div>
Expand All @@ -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);
}
Expand Down

0 comments on commit eb7e48e

Please sign in to comment.