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

fix: Add blockTrackingForMe method #27

Merged
merged 2 commits into from
Jan 17, 2022
Merged

fix: Add blockTrackingForMe method #27

merged 2 commits into from
Jan 17, 2022

Conversation

mxdvl
Copy link
Contributor

@mxdvl mxdvl commented Jan 12, 2022

Hi and thanks for this library!

I’m looking at implementing a way to let visitors of my website deactivate tracking entirely, and discovered that the type definition for Fathom was incomplete. It lacks the blockTrackingForMe and enableTrackingForMe methods.

Here’s a proposal to add both of them and queue like the other methods. Note:

  • I've kept the type dependent en the functions themselves.
  • I have not added tests, but can do.

Information gathered from the docs and local testing.

mxdvl added a commit to mxdvl/mxdvl that referenced this pull request Jan 12, 2022
@mxdvl mxdvl changed the title Add blockTrackingForMe method fix: Add blockTrackingForMe method Jan 12, 2022
@derrickreimer
Copy link
Owner

Thanks @mxdvl! Could you add exported function (similar to trackPageview) to proxy these calls to window.fathom (or push them onto the command queue)?

src/index.ts Outdated Show resolved Hide resolved
@derrickreimer
Copy link
Owner

Looking good! Thanks!

@derrickreimer derrickreimer merged commit 0e2eb1b into derrickreimer:master Jan 17, 2022
@mxdvl mxdvl deleted the patch-1 branch January 17, 2022 15:13
@derrickreimer
Copy link
Owner

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