npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@danpurdy/consent-manager

v6.0.2

Published

Drop-in consent management plugin for analytics.js

Downloads

5

Readme

:construction: :construction:

This repo is forked and moified from the @segment/[email protected] for a few reasons

Why?

Basically wanted to update some of the dependendencies and change a few of the options of the default drop in - could have made our own integration but for speed and ease of use chose to just modify this library while working on a few new projects. Will probably end up building our own using the exposed methods of this library if the parent repo changes a lot but for now this is fine.

  • Use NPM instead of yarn
  • All hardcoded text updated to props
  • Updates dependencies to remove isomorphic-fetch to isomorphic-unfetch
  • Removes emotion and moves over to styled-components as a peer dependency
  • Updates the peer dependecy for React to be ^16.10 || ^17.0
  • Modifies the default functionality to behave similar to the cookies popup found @bbc.co.uk/news and many other sites as we feel this handles our use case more. Due to the vulnerabilities mentioned above
  • Updates styling and prettier config to match current workflow
  • Move from CircleCi to Github actions for now

Possibly Todo

  • Update storybook and publish to Github Pages
  • Move tests away from enzyme to Jest & testing-library
  • Update babel and remove the es2015 preset etc

:construction: :construction:

Drop-in consent management plugin for analytics.js

Segment Consent Manager

The Segment Consent Manager is an analytics.js add-on with support to consent management.

At its core, the Consent Manager empowers your visitors to control and customize their tracking preferences on a website. They can opt out entirely of being tracked, or selectively opt out of tools in which they don’t want their information stored.

It works by taking control of the analytics.js load process to only load destinations that the user has consented to and not loading analytics.js at all if the user has opted out of everything. The user's tracking preferences are saved to a cookie and sent as an identify trait (if they haven't opted out of everything) so that you can also access them on the server-side and from destinations (warehouse).

Segment works to ensure the Consent Manager Tech Demo works with most of our product pipeline. We cannot ensure it works in your specific implementation or website. Please contact our Professional Services team for implementation support. Please see the License.txt included.

NOTE: you must include the method addSourceMiddleware in the analytics.methods array within the original segment snippet in your HEAD:

analytics.methods = [
  'trackSubmit',
  'trackClick',
  'trackLink',
  'trackForm',
  'pageview',
  'identify',
  'reset',
  'group',
  'track',
  'ready',
  'alias',
  'debug',
  'page',
  'once',
  'off',
  'on',
  'addSourceMiddleware' // This method is necessary for Consent Manager to forward consent metadata.
]

Orignal License

consent-manager is released under the MIT license.

Copyright © 2018, Segment.io, Inc.