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