MCPcopy Create free account
hub / github.com/dailydotdev/apps / HotJarTracking

Function HotJarTracking

packages/webapp/components/Pixels.tsx:230–249  ·  view source on GitHub ↗
({ hotjarId }: HotjarProps)

Source from the content-addressed store, hash-verified

228};
229
230export const HotJarTracking = ({ hotjarId }: HotjarProps): ReactElement => {
231 const consent = useHotjarConsent();
232 if (!consent) {
233 return null;
234 }
235 return (
236 <Script strategy="afterInteractive" id="load-hotjar">
237 {`
238 (function(h,o,t,j,a,r){
239 h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
240 h._hjSettings={hjid:${hotjarId},hjsv:6};
241 a=o.getElementsByTagName('head')[0];
242 r=o.createElement('script');r.async=1;
243 r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
244 a.appendChild(r);
245 })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
246 `}
247 </Script>
248 );
249};
250
251// "daily.dev for Startups": the /startups/ landing page loads the same site
252// with the same consent rule, so one recording runs from there through the

Callers

nothing calls this directly

Calls 1

useHotjarConsentFunction · 0.85

Tested by

no test coverage detected