Jump to content

How to add script for guest users only?


Recommended Posts

Posted

We have to add an exit intent popup script in globalTemplate, but we want it should only trigger to guest users.

Is that possible?

          <!-- Start App Sumo Javascript -->  
      <script async>(function(s,u,m,o,j,v){j=u.createElement(m);v=u.getElementsByTagName(m)[0];j.async=1;j.src=o;j.dataset.sumoSiteId='fb2ac9f4ac9d3e89da3cca0867b5';v.parentNode.insertBefore(j,v)})(window,document,'script','//load.sumo.com/');</script>
    <!-- End App Sumo Javascript -->  

 

Posted
{{if !member.member_id}}
          <!-- Start App Sumo Javascript -->  
      <script async>(function(s,u,m,o,j,v){j=u.createElement(m);v=u.getElementsByTagName(m)[0];j.async=1;j.src=o;j.dataset.sumoSiteId='fb2ac9f4ac9d3e89da3cca0867b5';v.parentNode.insertBefore(j,v)})(window,document,'script','//load.sumo.com/');</script>
    <!-- End App Sumo Javascript -->  
{{endif}}

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...