({ hotjarId }: HotjarProps)
| 222 | }; |
| 223 | |
| 224 | export 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 |
nothing calls this directly
no test coverage detected