Why is my personalization loading slowly?

This is usually due to your website loading other scripts first, causing Spotler Activate and your personalizations to have to wait for this. You can significantly improve load times by following these guidelines:

  • Place our tracker code as high as possible in the head tag.
  • Place it directly in your code, rather than using an external container such as Google Tag Manager.


Sample code: separate Spotler Activate code in combination with Google Tag Manager

<head> <script type="text/javascript"> (function(s,q,z,l,y){s._sqzl=s._sqzl||[];l=q.createElement('script'), y=q.getElementsByTagName('script')[0];l.async=1;l.type='text/javascript'; l.defer=true;l.src=z;y.parentNode.insertBefore(l,y)}) (window,document,'https://squeezely.tech/tracker/SQ-ID/sqzl.js'); </script> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-ID');</script> </head>

If you use Google Tag Manager, GTM must first be loaded and your tags processed before Spotler loads Activate, this causes noticeable delays.

Note: You can still send your events through GTM, it's specifically about the tracker code (it loads the personalizations) which is best loaded separately, before you load the GTM code.