Select Page

Integration: DanDomain Webshop

Sådan opsætter du integrationen mellem DanDomain Webshop og Heyloyalty.

Step-by-step guide

Åbn dette link for at generere dit trackingscript:

https://tracking.heycommerce.dk/gettrackingscript

 

<script> 
var currentDomain = window.location.hostname;    
  switch(currentDomain) {    
    case 'webshopno1':      
      trackingId = 'integrationID1';      
      break;    
    case 'webshopno2':      
      trackingId = 'integrationID2';      
      break;    
    default:      
      trackingId = 'integrationID1';   
  }
</script>
<script> 
  var hlt; 
  var HLTrackingLoaded = function (HLTracking) {    
    hlt=HLTracking;    
    HLTracking.initialize('INSERTAPIKEYHERE', INSERTSESSIONTIMEHERE, String(trackingId));    
    HLTracking.trackEvent('Visit'); 
  }
</script>
<script> 
  (function (d, t) {    
    var g = d.createElement(t),    
    s = d.getElementsByTagName(t)[0];    
    h = "https:" == document.location.protocol ? "https://" : "http://";    
    g.src = h + 'bi.heyloyalty.com/smartweb.js';    
    s.parentNode.insertBefore(g, s); 
  }(document, 'script')); 
  document.onsubmit = function(e) {    
    hlt.trackClick(e); 
  }
</script>