How do I install and publish a Klaviyo signup form on my website?

  • 27 November 2020
  • 18 replies
  • 1580 views

Userlevel 6
Badge +22

If you have an ecommerce integration with Shopify, BigCommerce, WooCommerce, or Magento, the first step has likely already been completed during your ecommerce integration setup of Klaviyo's Web Tracking. The integrations listed above automatically install klaviyo.js when you set up our built-in integration.

If you don’t use one of the above integrations or did not install Klaviyo’s Web Tracking, you’ll need to install the klaviyo.js below in your store’s main code.

<script type="text/javascript" async src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=Public API Key"></script>

Be sure to replace Public API Key with your specific API Key which you can find in your Account > Settings > API Keys.

Once you have this installed, all you need to do is navigate to the Signup Forms tab and create your form. If it's a popup or flyout all you need to do is set it Live and click Publish.

If it's an embedded form, there is one extra step: copying and pasting the provided <div> tag anywhere on your website that you want the embedded form to show.

 

Head to our article on Install Klaviyo Signup Forms for more information and a step-by-step guide. 

And if you’re ready to start creating your first forms, checkout our Overview of the Signup Form Builder for a closer look at all the options available to make your form unique for your site.


18 replies

Badge +1

I’m really confused about the form integration on Woo. Installed the app, so it says don’t need to install the code, created a popup form in Klaviyo but how to you get the popup form on your site? I don’t understand that process, and it’s confusing because there’s not a lot of documentation for woo. I know I can create popups in Elementor, but I would rather use Klaviyo because I’m having issues.

Userlevel 6
Badge +22

Hi @hartscott, happy to try and clear up any confusion! 

If you have successfully integrated your WooCommerce store with Klaviyo, web tracking should be installed as well. You can verify that web tracking is correctly installed by following the steps for testing your web tracking.

When you’ve verified that web tracking is installed, you will be able to publish any popup or flyout forms created in Klaviyo by clicking Publish within the Form Editor—no additional steps required. Your forms will then appear based on the behavioral parameters you set under the form’s Behaviors tab.

I recommend testing your form in an incognito browser to make sure it is appearing when you want it to. 

Badge +1

Web tracking is automatically installed via the app and api keys?

Userlevel 6
Badge +22

Web tracking is automatically installed via the app and api keys?

Yes, that should be the case!

Badge +1

I can get embedded fine, it’s reading data, which means that it’s properly working, but popups are a no go….

Userlevel 6
Badge +22

@hartscott It is possible it’s related to the settings in the behaviors tab. If you share a screenshot of the behaviors you have set for your form I’d be happy to take a look and see if we can figure it out together. 

Badge +1

@Julia.LiMarzi hey there. it states integration and sign up form successful; however, it is not popping up on my site. I have behaviors on pop up for all. Please assist.

Userlevel 6
Badge +22

@jaz I’d recommend checking out our signup form troubleshooting guide and seeing if that can help work through the issue. For example, Klaviyo forms will not appear on Internet Explorer, ensuring you are viewing your site on the device your form is set to show on, or making sure you’ve set your form to publish (you’d be surprised how easy this is to miss! :smile: ).

Since there a lot of variables you can adjust with Klaviyo’s behavorial settings, it’s important to make sure you follow any of the behaviors you set in your form editor when testing. 

If you find you are still having issue viewing the signup form though, let us know here and we can continue to walk through and investigate together. A screenshot of the Behaviors tab for the form in question is super helpful to see what’s going one within the form.

Badge +1

@Julia.LiMarzi  thank you so much for responding. 

I think I found the problem lol. I didn’t add the snippet believing it did it itself upon publishing. However, I'm confused on this api part that makes the snippet work. Attached is the behaviors screenshot.

Userlevel 6
Badge +22

@jaz Thanks for including the screenshot!

For an embedded form like this one, you’ll need to copy that snippet of code and add it to your website’s theme where you want the form to appear specifically. For example, the footer of your site is a common location for embedded signup forms, or within a dedicated landing page. The form will only show where the snippet has been added. This guide can help walk through how and where to paste a form’s embed code.

So if you publish the form but do not have the snippet added anywhere within your site code, it will not show. And if you add the code to your site, but unpublish the form it will not show then either. Both conditions need to be met for an embedded form to appear on site. 

Badge +1

@Julia.LiMarzi I was intending for it to be like a pop up when coming on my site. is this not an option?

 

I figured it out. sorry about that.

Userlevel 6
Badge +22

@Julia.LiMarzi I was intending for it to be like a pop up when coming on my site. is this not an option?

 

I figured it out. sorry about that.

No worries, great that you figured it out! I’m gonna go ahead and answer your question about changing form types though for others who may come across this post in the future:

When creating a signup form in Klaviyo, you’ll be prompted to select what type of form (Popup, Flyout, or Embed) you’d like to create first before designing your form. 

But if you change your mind while editing, you can easily toggle between the form types in the Styles tab of the Form Editor. 

The form will optimize for each form type, but be sure to review you form’s design and behavioral settings, as different options will become available for each form type. 

Badge +2

Hi Julia,

I have created a new shopify page, which I intend to dedicate as a sign-up landing page; but can’t seem to find any guide as to where to embed the snippet and the code, to make sure it appears on the page? 
 

thanks,

adeline

Badge +2

If I use a page builder program (GemPages, PageFly, Shogun, etc.) does the snippet go into the landing page and it will be active and collect emails the same as if I added the snippet on an actual Shopify page?

Userlevel 7
Badge +60

Hello @keepitsimple,

@skellam has a great post on troubleshooting signup forms here that may be able to assist you:

Other suggestions I would recommend double-checking when troubleshooting why a form is not displaying on your site:

  • Ensuring the Klaviyo form is set to Live.
  • Double checking the form behavior and settings - particularly the (Audience) Targeting and the Device Targeting settings.
  • Is the Klaviyo.js present on the same page you want the Klaviyo form to appear on?

-David

what if I am using pagefly as my homepage. I can’t find any help with embedding the code on page fly. I did custom html. I used the actual Klaviyo form that they had on pagefly and its not appearing. 

Userlevel 7
Badge +60

Hi @ehenderson

 

Thanks for sharing your question with the Community! Embedded codes are a great tool to gain more subscribers. 

 

To embed the code into your homepage, you will need to paste the code into your website’s website, given in the form’s behavior tab. However, display issues can arise when multiple .of our onsite javascript is added to one website. If you are having display issues, I would investigate your website code by navigating to your homepage and right clicking the ‘View Source Code’ option. Then hit control + F and type in ‘klaviyo’. If you find multiple lines of duplicate javascript in your site’s code, I would remove the duplicates and this should resolve this issue! 

 

For additional insight, this user had a similar issue with their Pagefly site. 

 

Thanks for being a part of the Community! 

-Taylor 

Badge +1

Hello, I’m using Klaviyo on our Magento 2 site. I have completed “Setup Web Tracking” and when I put our URL in, it shows connected. 

However, when I create sign-up form, it says that I need to put an additional line of code in?? Where does this line of code go? I’ve tried putting it in the main header file, but it just says “Unable to detect that signup forms are successfully installed on your site. Please view the installation documentation.”

The installation documentation says that I shouldn’t have to do this step as it should have happened at installation. So why isn’t it working then?

Any help would be greatly appreciated!

Reply