Klaviyo not install snipped after code haded to Wordpress Header and footer Script

  • 7 December 2021
  • 1 reply
  • 444 views

Badge +2

I integrated my WordPress account with klaviyo, then I created a signup form

I installed snippet code to WordPress by watching video displayed in Klaviyo help center but yet Klaviyo is uanle to access snippet code and Sign up form doesn't display 


1 reply

Userlevel 7
Badge +58

Hi there @biblerian,

Welcome to the Community! I hope to provide some assistance regarding Klaviyo signup forms and a WordPress integration.

This guide walks through installing a code snippet in the header of your site that allows you to publish signup forms from your Klaviyo account to your site. This is a one-time installation that updates automatically when you add new forms or edit existing forms within the Signup Forms tab of your account:


Please note that new signup forms will not render for browsers using Internet Explorer. Legacy signup forms will continue to render for those using any type of web browser.

Some integrations, such as Shopify and BigCommerce, automatically install klaviyo.js when you set up our built-in integration. If you've already enabled klaviyo.js then you don't need to also install the snippet listed lower in this section.

To install Klaviyo signup forms on your site, first copy the signup form code snippet below and update "Public API Key" with your Klaviyo Public API Key. Then, paste the updated snippet into your site's theme files.

This code block automatically populates line 3 with the Klaviyo public API key for the Klaviyo account you are currently logged in to. If you use multiple Klaviyo accounts, check that the correct public API key has been added to the code block. If you see "Public API Key", then your public API key has not loaded, and you'll have to manually update it. Copy your 6-character public API key from the Accounts > Settings > API Keys tab in your Klaviyo account.
mceclip0.png

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

After updating this snippet with your Klaviyo Public API key, paste it into the main theme file of your site, so that the code appears on every page. The exact file and location where this code must be placed varies by ecommerce integration.

  • If you're using Shopify, paste the snippet into your theme.liquid file on a new line above the closing </body> tag.
  • If you're using a BigCommerce Stencil theme, navigate to Storefront > Footer Scripts from your BigCommerce Admin panel and paste the snippet into the Footer code box on a new line.
  • If you're using a BigCommerce Blueprint theme, paste the code into the Footer.html file on a new line at the end of the file.

If you're using an integration that is not listed above, paste the snippet into your default theme file, so that it appears on every page of your site. This allows you to trigger forms on any page on your site.
You can control the specific pages your form appears on (or does not appear on) using the Behaviors tab.

Another community form goes over a similar issue too:

Hope this helped and have a great day!
Alex

Reply