Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: add support for fathom tracking pixel #281

Merged
merged 1 commit into from
May 9, 2024
Merged

Conversation

johann-crabnebula
Copy link
Contributor

@johann-crabnebula johann-crabnebula commented May 7, 2024

This PR adds support to add the privacy friendly fathom tracking pixel.

ToDos:

  • Make sure to add the necessesary env-vars to Netlify:
    VITE_FATHOM_URL and VITE_FATHOM_ID

Closes DT-115

Copy link

netlify bot commented May 7, 2024

Deploy Preview for cn-devtools-app ready!

Name Link
🔨 Latest commit cdfd102
🔍 Latest deploy log https://app.netlify.com/sites/cn-devtools-app/deploys/663a44d5efa2690008a36333
😎 Deploy Preview https://deploy-preview-281--cn-devtools-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

const fathomUrl = import.meta.env.VITE_FATHOM_URL;
const fathomId = import.meta.env.VITE_FATHOM_ID;
if (fathomUrl && fathomId)
createScriptLoader({ src: fathomUrl, "data-site": fathomId, defer: true });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can only test in production if there is some CSP headers blocking the script. Most ad blockers will block it. too.

@johann-crabnebula johann-crabnebula merged commit 28b2c48 into main May 9, 2024
6 checks passed
@johann-crabnebula johann-crabnebula deleted the feat/fathom branch May 9, 2024 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants