sjksanders Posted May 9 Posted May 9 Hi I've moved from Mailerlite to Klaviyo recently and am having big problems connecting it with Squarespace. I have managed to get the initial site wide pop up form to work - so I am getting newsletter subscribers - but today I wanted to add a form that would pop up on a button being clicked. This is the code that Klaviyo wanted to be added (the javascript and also the trigger) - I included them in the site header. The form code is specific to the one I created <script async type="text/javascript" src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=VRauc3"></script> <script> document.querySelector('#klaviyo_form_trigger').addEventListener('click',function (){ var _klOnsite = window._klOnsite || [] _klOnsite.openForm('UkGnCW') }); </script> However, when I add a button block, nothing happens. It just loops the page. I have tried checking from a private browser page, I have tried adding the code in the footer - I've tried everything I can think of. It seems like Klaviyo and Squarespace REALLY don't play well together but it makes no sense since the first form - the newsletter one - was so easy. I'm really fed up. I contacted both support services, removed a bunch of CSS, tidied up the custom code injection and nothing works. I would really appreciate some help
Beyondspace Posted May 10 Posted May 10 11 hours ago, sjksanders said: Hi I've moved from Mailerlite to Klaviyo recently and am having big problems connecting it with Squarespace. I have managed to get the initial site wide pop up form to work - so I am getting newsletter subscribers - but today I wanted to add a form that would pop up on a button being clicked. This is the code that Klaviyo wanted to be added (the javascript and also the trigger) - I included them in the site header. The form code is specific to the one I created <script async type="text/javascript" src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=VRauc3"></script> <script> document.querySelector('#klaviyo_form_trigger').addEventListener('click',function (){ var _klOnsite = window._klOnsite || [] _klOnsite.openForm('UkGnCW') }); </script> However, when I add a button block, nothing happens. It just loops the page. I have tried checking from a private browser page, I have tried adding the code in the footer - I've tried everything I can think of. It seems like Klaviyo and Squarespace REALLY don't play well together but it makes no sense since the first form - the newsletter one - was so easy. I'm really fed up. I contacted both support services, removed a bunch of CSS, tidied up the custom code injection and nothing works. I would really appreciate some help Can you share you URL so I can check it? BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> No-code customisations for Squarespace
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment