Skip to content

Commit

Permalink
Add conditional tracking pixel (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-schneider authored May 3, 2024
1 parent 67ec554 commit 7516b54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/partials/body-end-scripts.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<script data-sync-storage-key="preferred-tab" async src="{{{uiRootPath}}}/js/vendor/tabs.js"></script>
<script async src="{{{uiRootPath}}}/js/vendor/highlight.js"></script>
<script async src="{{{uiRootPath}}}/js/vendor/zooming.js"></script>

<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script>
{{#with site.keys}}
{{#if (and algoliaAppId algoliaIndexName algoliaApiKey)}}
Expand All @@ -18,3 +17,4 @@
{{/if}}
{{/with}}
{{> intercom}}
{{> scarf}}
4 changes: 4 additions & 0 deletions src/partials/scarf.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{#with site.keys.scarfTrackingPixel}}
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid={{this}}"
style="display:none" />
{{/with}}

0 comments on commit 7516b54

Please sign in to comment.