Sunday, 23 July 2023

Does partytown support smartlook? Problelm in integrating smartlook with partytown

I am trying to integrate smartlook using partytown using this code:

<script type='text/javascript'>
  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/partytown';
    c.charset='utf-8';c.src='https://web-sdk.smartlook.com/recorder.js';h.appendChild(c);
    })(document);
    smartlook('init', PROJECT_KEY, { region: REGION });
</script>

it does not give any errors but does not show anything on the smartlook is there something wrong I am doing?

I have addes this code before all of the headers

 <script type="module">
      import { partytownSnippet } from "@builder.io/partytown/integration";
      const snippetText = partytownSnippet();
      const el = document.createElement("script");
      el.innerText = snippetText;
      document.head.appendChild(el);
    </script>

I have added this to scripts in package.json:

"scripts": {
    "partytown": "partytown copylib public/~partytown"
  },


from Does partytown support smartlook? Problelm in integrating smartlook with partytown

No comments:

Post a Comment