Socket
Socket
Sign inDemoInstall

ngx-clarity

Package Overview
Dependencies
5
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-clarity

Angular module to add the tracking code for microsoft.clarity.com


Version published
Maintainers
1
Weekly downloads
1,927
increased by21.35%

Weekly downloads

Readme

Source

Ngx-Clarity

Build Test Lint

A useful Angular library that automatically injects the script tag required to use Microsoft Clarity.

Installation

npm:

npm install --save ngx-clarity

Yarn:

yarn add ngx-clarity

Compatibility

VersionAngular Version
1.x.x>=13 <15
2.x.x>=15 <18

Features

  • Automatically inject scripts for Microsoft Clarity.

Usage

Import provideClarity from ngx-clarity and pass the required configuration when using it as a provider during application bootstrap.

import { provideClarity } from 'ngx-clarity';

@NgModule({
  providers: [
    provideClarity({
      enabled: true,
      projectId: 'my-project-id',
    }),
  ],
})
export class AppModule {}

// Or if you are using standalone bootstrap

bootstrapApplication(AppComponent, {
  providers: [
    provideClarity({
      enabled: true,
      projectId: 'my-project-id',
    }),
  ],
});

The supported configuration parameters are:

PropertyRequirementDescription
enabledRequiredWhether or not this module is enabled. Useful for disabling the analytics script in development environments.
projectIdRequiredYour Microsoft Clarity project Id. This is found in the Microsoft Clarity console.

License

MIT

Keywords

FAQs

Last updated on 02 Dec 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc