Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

PerDiemInc/nuxt-microsoft-clarity

Repository files navigation

NuxtJS Microsoft Clarity

A NuxtJS plugin for injecting the Microsoft Clarity script tags into the head section of the HTMl page

Table of Contents

Requirements

  • npm
  • NuxtJS
  • NodeJS

Install

  # npm
  $ npm i nuxtjs-microsoft-clarity --save

  # yarn
  $ yarn add nuxtjs-microsoft-clarity

Getting Started

Add 'nuxtjs-microsoft-clarity' to the modules section of your nuxt.config.js file.

Method 1: Inline configuration entry

{
  modules: [
    'nuxtjs-microsoft-clarity', {
      // Options
    }
  ],
}

Method 2: External configuration entry

Add microsoftClarity section in nuxt.config.js to set the module options:

{
  modules: [
    'nuxtjs-microsoft-clarity'
  ],
  microsoftClarity: {
    // Options
  },
}

Method 3: Runtime Config

{
  modules: [
    'nuxtjs-microsoft-clarity'
  ],
  // Use as fallback if no runtime config is provided
  microsoftClarity: {
    // Options
  },
  publicRuntimeConfig: {
    microsoftClarity: {
      // Options
    }
  }
}

Options

The following options can be configured in the module's configuration entry in your nuxt.config.js file

Microsoft Clarity ID - id

  • Required
  • Default: null

Usage

Starts tracking automatically if everything goes well. Note: It takes maximum duration of 2 hours before data start showing up on Microsoft Clarity dashboard

About

Microsoft Clarity client for Nuxt.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published