Skip to content

Commit

Permalink
fix: integrate smartlook
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnvdkolk committed Jan 27, 2024
1 parent 073e576 commit 14c8daf
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import localFont from '@next/font/local';
import clsx from 'clsx';
import ErrorBoundary from '@/components/ErrorBoundary';

import Script from 'next/script';

// TODO: this is the stupidest solution to the worst issue ever, works for now
// https://github.com/tailwindlabs/headlessui/discussions/666#discussioncomment-1891380
if (typeof window !== 'undefined') {
Expand Down Expand Up @@ -64,16 +62,18 @@ const Ogp = () => (

const Smartlook = () => {
return (
<>
<Script id="smartlook-tag">
{` window.smartlook || (function(d) {
var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];
var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';
c.charset='utf-8';c.src='https://web-sdk.smartlook.com/recorder.js';h.appendChild(c);
})(document);
smartlook('init', '6262fc1ab5badfb59df569ba2daf04f562017bfd', { region: 'eu' });`}
</Script>
</>
<script
dangerouslySetInnerHTML={{
__html: `
window.smartlook||(function(d) {
var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];
var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';
c.charset='utf-8';c.src='https://web-sdk.smartlook.com/recorder.js';h.appendChild(c);
})(document);
smartlook('init', '6262fc1ab5badfb59df569ba2daf04f562017bfd', { region: 'eu' });
`,
}}
/>
);
};

Expand Down

0 comments on commit 14c8daf

Please sign in to comment.