Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

110
Views
Button Trigger Emdedded Klaviyo Form

Basically I want a embedded form to appear when a button is clicked. Seems simple but I'm working with Klaviyo and Squarespace, these two are not linked to work together as opposed to other platforms such as BigCommerce, Shopify, etc. Squarespace has the option to put a button and link it to a URL or a document, but not to trigger some line of code, so I need to code inject into the squarespace page from scratch. I have the button but when i click on it, it doesn't trigger anything.

A few days ago Klaviyo uploaded this article to their Help Center https://help.klaviyo.com/hc/en-us/articles/4418052317339-How-to-Trigger-a-Popup-or-Flyout-Form-When-a-Button-Is-Clicked

I've been trying to make this work and I cannot find the solution, here's what I have so far:

<div class="sqs-block button-block sqs-block-button">
  <div align="center">
    <a id="klaviyo_form_trigger" class="sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element">Get the template</a>
  </div>
</div>

<script type="text/javascript" src="//www.klaviyo.com/media/js/public/klaviyo_subscribe.js" async="">
document.getElementByID("#klaviyo_form_trigger").addEventListener('click',function (){
        var _klOnsite = window._klOnsite || []
        _klOnsite.push(['openForm', 'FormID'])
});
</script>

Just incase: yes, I have Klaviyo.js running, yes, I installed the form snippet, yes, i have my personal FormID in my code

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!