[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EF5P9A92D5CW4HS52K4Q71":3,"skill-same:01M6EF5P9A92D5CW4HS52K4Q71":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":30,"linkOnly":31,"markdownContent":32,"markdownBody":32,"frontMatter":33,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":39,"ownerHtmlUrl":40,"ownerBlogUrl":7,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M6EF5P9A92D5CW4HS52K4Q71","hotjar","Hotjar 用户行为分析",null,"","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fhotjar\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8C2MZSX0YJXR444XP83VR5N","产品经理","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8C76K6M895TMWRJHR23VMAW","客户发现与用户研究","SCENARIO","使用场景",[5],"2026-11-10 10:12:30",false,"# Hotjar\n\nHeatmaps, session recordings, and user feedback. See how users actually interact with your site and collect qualitative insights.\n\n## Script Installation\n\n```html\n\u003C!-- index.html — Add the Hotjar tracking script to your site.\n     Place in \u003Chead> for heatmaps and recordings to capture from first paint. -->\n\u003Chead>\n  \u003Cscript>\n    (function(h,o,t,j,a,r){\n        h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n        h._hjSettings={hjid:YOUR_SITE_ID,hjsv:6};\n        a=o.getElementsByTagName('head')[0];\n        r=o.createElement('script');r.async=1;\n        r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n        a.appendChild(r);\n    })(window,document,'https:\u002F\u002Fstatic.hotjar.com\u002Fc\u002Fhotjar-','.js?sv=');\n  \u003C\u002Fscript>\n\u003C\u002Fhead>\n```\n\n## Next.js Integration\n\n```typescript\n\u002F\u002F components\u002Fhotjar.tsx — Add Hotjar to a Next.js App Router app.\n\u002F\u002F Uses next\u002Fscript for optimal loading without blocking rendering.\n'use client'\nimport Script from 'next\u002Fscript'\n\nexport function HotjarScript({ siteId }: { siteId: number }) {\n  return (\n    \u003CScript\n      id=\"hotjar\"\n      strategy=\"afterInteractive\"\n      dangerouslySetInnerHTML={{\n        __html: `\n          (function(h,o,t,j,a,r){\n            h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n            h._hjSettings={hjid:${siteId},hjsv:6};\n            a=o.getElementsByTagName('head')[0];\n            r=o.createElement('script');r.async=1;\n            r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n            a.appendChild(r);\n          })(window,document,'https:\u002F\u002Fstatic.hotjar.com\u002Fc\u002Fhotjar-','.js?sv=');\n        `,\n      }}\n    \u002F>\n  )\n}\n```\n\n```typescript\n\u002F\u002F app\u002Flayout.tsx — Include Hotjar in the root layout.\n\u002F\u002F Only loads in production to avoid polluting dev data.\nimport { HotjarScript } from '@\u002Fcomponents\u002Fhotjar'\n\nexport default function RootLayout({ children }: { children: React.ReactNode }) {\n  return (\n    \u003Chtml lang=\"en\">\n      \u003Cbody>\n        {children}\n        {process.env.NODE_ENV === 'production' && (\n          \u003CHotjarScript siteId={Number(process.env.NEXT_PUBLIC_HOTJAR_SITE_ID)} \u002F>\n        )}\n      \u003C\u002Fbody>\n    \u003C\u002Fhtml>\n  )\n}\n```\n\n## JavaScript API — Events and User Attributes\n\n```typescript\n\u002F\u002F lib\u002Fhotjar.ts — Hotjar JavaScript API helpers.\n\u002F\u002F Identify users, trigger events, and control recordings.\ndeclare global {\n  interface Window {\n    hj: (...args: any[]) => void\n  }\n}\n\nexport function identifyHotjarUser(userId: string, attributes: Record\u003Cstring, string | number | boolean>) {\n  \u002F**\n   * Identify a user for filtering session recordings.\n   * Attributes appear in the Hotjar dashboard for segmentation.\n   * Max 100 attributes per user.\n   *\u002F\n  window.hj('identify', userId, attributes)\n}\n\nexport function triggerHotjarEvent(eventName: string) {\n  \u002F**\n   * Trigger a custom event. Use to:\n   * - Start a recording on a specific user action\n   * - Show a survey when a condition is met\n   * - Tag recordings for filtering\n   *\u002F\n  window.hj('event', eventName)\n}\n\nexport function tagRecording(...tags: string[]) {\n  \u002F**\n   * Add tags to the current session recording.\n   * Useful for filtering recordings by feature, experiment, or error state.\n   *\u002F\n  window.hj('tagRecording', tags)\n}\n\nexport function triggerSurvey(surveyId: number) {\n  \u002F**\n   * Manually trigger a Hotjar survey (bypasses page targeting rules).\n   * Survey must be set to \"API\" trigger mode in the Hotjar dashboard.\n   *\u002F\n  window.hj('trigger', `survey_${surveyId}`)\n}\n\nexport function setStateChange(url: string) {\n  \u002F**\n   * Notify Hotjar of a virtual page change in an SPA.\n   * Required for accurate heatmaps on client-side routed pages.\n   *\u002F\n  window.hj('stateChange', url)\n}\n```\n\n## SPA Route Change Tracking\n\n```typescript\n\u002F\u002F hooks\u002Fuse-hotjar-spa.ts — Track route changes in React SPAs for Hotjar.\n\u002F\u002F Ensures heatmaps and recordings capture navigation in client-side routing.\n'use client'\nimport { usePathname } from 'next\u002Fnavigation'\nimport { useEffect } from 'react'\n\nexport function useHotjarSPA() {\n  const pathname = usePathname()\n\n  useEffect(() => {\n    if (typeof window.hj === 'function') {\n      window.hj('stateChange', pathname)\n    }\n  }, [pathname])\n}\n```\n\n## Privacy Controls\n\n```typescript\n\u002F\u002F lib\u002Fhotjar-privacy.ts — Configure Hotjar privacy and suppression.\n\u002F\u002F Control what gets captured in recordings and heatmaps.\n\n\u002F**\n * CSS classes for element-level control:\n *\n * data-hj-suppress     — Mask element text in recordings (shows asterisks)\n * data-hj-allow        — Explicitly allow capturing (overrides global suppress)\n * data-hj-masked       — Mask input field values\n *\n * HTML example:\n * \u003Cinput type=\"email\" data-hj-suppress \u002F>\n * \u003Cdiv data-hj-suppress>Sensitive content here\u003C\u002Fdiv>\n * \u003Cspan data-hj-allow>Public content\u003C\u002Fspan>\n *\u002F\n\nexport function configureSuppression() {\n  \u002F\u002F Suppress all input fields by default (opt-in to capture)\n  \u002F\u002F Set in Hotjar dashboard: Settings → Data Collection → Input masking\n  \u002F\u002F Or use CSS selectors to target specific elements\n\n  \u002F\u002F Programmatically suppress dynamic content\n  const sensitiveElements = document.querySelectorAll('[data-sensitive]')\n  sensitiveElements.forEach((el) => {\n    el.setAttribute('data-hj-suppress', '')\n  })\n}\n```\n\n## Integration with Google Analytics\n\n```typescript\n\u002F\u002F lib\u002Fhotjar-ga-integration.ts — Link Hotjar sessions with Google Analytics.\n\u002F\u002F Pass the GA client ID to Hotjar for cross-referencing sessions.\nexport function linkHotjarToGA() {\n  \u002F\u002F Wait for both GA and Hotjar to load\n  const interval = setInterval(() => {\n    if (typeof window.hj === 'function' && typeof window.gtag === 'function') {\n      clearInterval(interval)\n\n      \u002F\u002F Get the GA client ID\n      window.gtag('get', 'G-XXXXXXXXXX', 'client_id', (clientId: string) => {\n        \u002F\u002F Pass GA client ID as a Hotjar user attribute\n        window.hj('identify', null, {\n          ga_client_id: clientId,\n        })\n      })\n    }\n  }, 500)\n\n  \u002F\u002F Clean up after 10 seconds\n  setTimeout(() => clearInterval(interval), 10000)\n}\n```\n\n## Survey API\n\n```typescript\n\u002F\u002F lib\u002Fhotjar-surveys.ts — Trigger Hotjar surveys based on user behavior.\n\u002F\u002F Combine with event tracking to show surveys at the right moment.\n\nexport function showNPSSurveyAfterPurchase() {\n  \u002F**\n   * Trigger NPS survey after a successful purchase.\n   * Survey configured in Hotjar dashboard with API trigger mode.\n   *\u002F\n  window.hj('trigger', 'post_purchase_nps')\n}\n\nexport function showChurnSurvey() {\n  \u002F**\n   * Show exit survey when user clicks cancel subscription.\n   * Captures churn reason before they leave.\n   *\u002F\n  window.hj('trigger', 'churn_survey')\n}\n\nexport function showFeatureFeedback(featureName: string) {\n  \u002F**\n   * Collect feedback on a specific feature.\n   * Tag the recording so you can watch sessions where feedback was given.\n   *\u002F\n  window.hj('tagRecording', [`feedback_${featureName}`])\n  window.hj('trigger', 'feature_feedback')\n}\n```\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Fhotjar",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":9,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill hotjar",{"tool":49,"command":50},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill hotjar",{"tool":52,"command":53},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill hotjar","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fhotjar\u002FSKILL.md",true,[],[58,67,76,85,91,97],{"skillNo":59,"name":60,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":30},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[64,65,66],"model","model hierarchy","model hierarchy skill",{"skillNo":68,"name":69,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":30},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[73,74,75],"MCP","zoom","zoom mcp",{"skillNo":77,"name":78,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":30},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[82,83,84,74],"sdk","zoom apps sdk","apps",{"skillNo":86,"name":87,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":30},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[87],{"skillNo":92,"name":93,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":30},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[93],{"skillNo":98,"name":99,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":30},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[99]]