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 an enabled flag to options #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

btkostner
Copy link

Description

This adds an enabled bool option that would disable sending any events to Plausible, but keep all functions working.

Related Issue

Fixes #9

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Feb 16, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@a5f8e94). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             master       #10   +/-   ##
==========================================
  Coverage          ?   100.00%           
==========================================
  Files             ?         2           
  Lines             ?        68           
  Branches          ?        18           
==========================================
  Hits              ?        68           
  Misses            ?         0           
  Partials          ?         0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5f8e94...b4d9f8b. Read the comment docs.

@ukutaht
Copy link
Contributor

ukutaht commented Feb 23, 2021

Sorry I didn't have notifications on for this repository...

LGTM. @Maronato do you have any comments?

@priithansen
Copy link

This would be quite useful if someone uses trackEvent() or trackPageview() functions throughout their codebase and wants to disable Plausible analytics for development, staging, or testing environments, without having to wrap the functions to ensure they're always available.

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.

Allow disable sending events in configuration
3 participants