0.0.14 • Published 18 days ago

@trnsprncy/oss v0.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
18 days ago

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

NameDefaultrequiredDescription
consentCookie'app-consent'nokey name of the cookie used to manage user's consent
essentialTagsundefinedyesarray of google consent tags for personalization and functionality storage consent
analyticsTagsundefinednoarray of google consent tags for ads, analytics and monitoring related storage consent.
enabledtruenoglobally enable or disable the TrnsprncyProvider
redacttruenoadds the global 'ads_data_redaction' consent which redacts all sensitive user related data from the tracking data.
dataLayerName'dataLayer'nosets the name used for the dataLayer object added by google tag manager to the user's window object.
gtagName'gtag'nosets 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)
0.0.14

18 days ago

0.0.10

19 days ago

0.0.12

19 days ago

0.0.13

19 days ago

0.0.1

21 days ago