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

@trnsprncy/oss

v0.0.19

Published

A package for Google Tag Manager integration and consent handling in Next.js applications

Downloads

3

Readme

Trnsprncy

A modern easy-to-use Google Tag Manager component optimized for Next.js applications.


What is Trnsprncy

rnsprncy simplifies cookie consent management for developers at its core. As fellow developers who’ve grappled with the intricacies of optimizing Google Tag Manager and addressing performance issues in our applications, we deeply understand the challenge. The repetitive task of re-implementing the same cookie consent pattern across multiple applications can be exhausting.

trnsprncy offers an optimal open-source solution to one of the most significant challenges in building performant web applications. By using trnsprncy, you can focus on your core business logic without being bogged down by the complexities of varying international cookie compliance guidelines. It’s time to streamline your cookie consent process and ensure a seamless user experience.

trnsprncy-bg

Dependencies

Installation

npm install @trnsprncy/oss

Usage

// app/layout.tsx


import ConsentProvider from '@trnsprncy/oss';

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <body>
          {children}
        
          <TrnsprncyProvider
          consentCookie="app-consent"
          essentialTags={[
            "functionality_storage",
            "personalization_storage",
          ]}
        >
          <Banner/> // use any banner component or the @trnsprncy/ui kit
        </TrnsprncyProvider>

      </body>
    </html>
  );
}

Props

| Name | Default | required | Description | | ------------- | --------------- | -------- | ------------------------------------------------------------ | | consentCookie | 'app-consent' | no | key name of the cookie used to manage user's consent | | essentialTags | undefined | yes | array of google consent tags for personalization and functionality storage consent | | analyticsTags | undefined | no | array of google consent tags for ads, analytics and monitoring related storage consent. | | enabled | true | no | globally enable or disable the TrnsprncyProvider | | redact | true | no | adds the global 'ads_data_redaction' consent which redacts all sensitive user related data from the tracking data. | | dataLayerName | 'dataLayer' | no | sets the name used for the dataLayer object added by google tag manager to the user's window object. | | gtagName | 'gtag' | no | sets the name used for the gtag function that is used to handle the user's google-tag-manager consent. |

Roadmap

  • [ ] Add support for 3rd party/custom const tags.
  • [ ] internationalization (i8n)