{"id":16949685,"url":"https://github.com/kermanx/vite-plugin-ms-clarity","last_synced_at":"2025-10-20T04:41:58.232Z","repository":{"id":213691608,"uuid":"734722531","full_name":"kermanx/vite-plugin-ms-clarity","owner":"kermanx","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-01T15:42:54.000Z","size":19,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-13T11:07:39.298Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kermanx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-22T12:41:05.000Z","updated_at":"2025-05-14T21:11:18.000Z","dependencies_parsed_at":"2024-01-07T18:04:42.556Z","dependency_job_id":"608e13b9-dbf7-4a79-b207-eabccd9714fe","html_url":"https://github.com/kermanx/vite-plugin-ms-clarity","commit_stats":null,"previous_names":["kermanx/vite-plugin-ms-clarity"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kermanx/vite-plugin-ms-clarity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kermanx%2Fvite-plugin-ms-clarity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kermanx%2Fvite-plugin-ms-clarity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kermanx%2Fvite-plugin-ms-clarity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kermanx%2Fvite-plugin-ms-clarity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kermanx","download_url":"https://codeload.github.com/kermanx/vite-plugin-ms-clarity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kermanx%2Fvite-plugin-ms-clarity/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259634373,"owners_count":22887698,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T21:55:49.464Z","updated_at":"2025-10-20T04:41:58.170Z","avatar_url":"https://github.com/kermanx.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vite-plugin-ms-clarity\n\nVite plugin for [Microsoft Clarity](https://clarity.microsoft.com/).\n\n## Usage\n\n```js\n// vite.config.js\nimport { defineConfig } from \"vite\";\nimport MsClarity from \"vite-plugin-ms-clarity\";\n\nexport default defineConfig({\n  plugins: [MsClarity(\"YOUR-CLARITY-PROJECT-ID\")],\n});\n```\n\nIf you only want to enable the plugin when an environment variable is set, you can use the plugin like this:\n\n```js\ndefineConfig({\n  plugins: [process.env.ENABLE_CLARITY \u0026\u0026 MsClarity(\"YOUR-CLARITY-PROJECT-ID\")],\n});\n```\n\nYou can also use an object as the option:\n\n```js\nMsClarify({\n  id: \"YOUR-CLARITY-PROJECT-ID\",\n  enableInDevMode: true,\n  // ...\n});\n```\n\n## Options\n\n### `id`\n\n**Type**: `string | undefined`\n\n**Example**: `k4vhy94oj3`\n\nThe ID of the project Clarity provides to you.\n\nCan be found in the URL of your project.\n\n### `script`\n\n**Type**: `string | undefined`\n\n**Default**: `undefined`\n\nThe code to inject in the HTML.\n\nIf provided, the `id` option will be ignored.\n\nIf not provided, the script provided by Clarity will be used, with the `id` provided.\n\n### `enableInDevMode`\n\n**Type**: `boolean`\n\n**Default**: `false`\n\nWhether to inject the script in development mode.\n\n### `injectTo`\n\n**Type**: [`vite.HtmlTagDescriptor[\"injectTo\"]`](https://cn.vitejs.dev/guide/api-plugin#transformindexhtml)\n\n**Default**: `\"head-prepend\"`\n\nWhere to inject the script.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkermanx%2Fvite-plugin-ms-clarity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkermanx%2Fvite-plugin-ms-clarity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkermanx%2Fvite-plugin-ms-clarity/lists"}