CodeIgniter Forums
how to call this js? - Printable Version

+- CodeIgniter Forums (
+-- Forum: Using CodeIgniter (
+--- Forum: General Help (
+--- Thread: how to call this js? (/showthread.php?tid=81228)

how to call this js? - richb201 - 02-07-2022

I have been told that I need to call this js when I want a survey to appear. How can I call this from my controller? 
<script type="text/javascript">
  !function(e,t,r,n){if(!e[n]){for(var a=e[n]=[],i=["survey","reset","config","init","set","get","event","identify","track","page","screen","group","alias"],s=0;s<i.length;s++){var c=i[s];a[c]=a[c]||function(e){return function(){var;a.push([e,t])}}(c)}a.SNIPPET_VERSION="1.0.1";var o=t.createElement("script");o.type="text/javascript",o.async=!0,o.src=""+r+"/"+n+".js";var f=t.getElementsByTagName("script")[0];f.parentNode.insertBefore(o,f)}}(window,document,"123","delighted");

    email: "[email protected]", // customer email (optional)
    name: "Bailey Dixon",              // customer name (optional)
    recurringPeriod: "7890000",        // recurring period
    properties: {                      // extra context (optional)
      project: "PROJECT_NAME"