withastro/astro.build

INTEGRATION:can you add microsoft clarity integration

Closed this issue · 6 comments

NPM package name

description: "Provides Google Analytics 4 snippet injection."

Short description (if different than package.json) and icon

description: "Provides Google Analytics 4 snippet injection."

there is a google analytics, I can add it to my own.but I think this user behavior monitoring tool is really helpful

Homepage URL (if different than package.json)

description: "Provides Google Analytics 4 snippet injection."

Hi @wanghaisheng! This form is mainly for requesting we add packages that exist on npm to the website, not to create new packages that don’t currently exist.

If anyone is interested in building a Microsoft Clarity integration or Astro, I’m happy to help with any questions they might have. We have a guide to making an npm package here: https://docs.astro.build/en/reference/publish-to-npm/

@delucis I have modify from the google analytic one
https://github.com/wanghaisheng/astro-microsoft-clarity
can you help to review and test this one
I have not succeed to publish it

@delucis

(base) wenke@wenkedeMac-mini idea-to-action-cycle % pnpm config set registry http://registry.npm.taobao.org 
(base) wenke@wenkedeMac-mini idea-to-action-cycle % npm create astro@latest demo -- --template minimal      

undefined:1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
^

SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at IncomingMessage.<anonymous> (file:///Users/wenke/.npm/_npx/abdb4b598af046c4/node_modules/create-astro/dist/index.js:284:32)
    at IncomingMessage.emit (node:events:539:35)
    at endReadableNT (node:internal/streams/readable:1344:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Node.js v18.2.0
npm ERR! code 1
npm ERR! path /Users/wenke/github/idea-to-action-cycle
npm ERR! command failed
npm ERR! command sh -c create-astro "demo" "--template" "minimal"

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/wenke/.npm/_logs/2023-06-12T11_10_07_312Z-debug-0.log

I see you used pnpm in the first command there but npm in the second. Should they be the same?

I have tried all npm pnpm yarn, none of them works

I’ve seen in the past people need to set the registry when running create astro. For example:

npm create astro@latest --registry="https://registry.npmjs.org/"

Not sure if that helps here? Either with this or with your alternative registry.