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

Function HotJarTracking

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

Source from the content-addressed store, hash-verified

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