Solved

Integration to Wordpress


Badge +2

Hi,

 

Can anyone help and let us know how to integrate Klaviyo onto Wordpress but not WooCommerce.  We used WP to develop our website but we are selling services, not products, so we don’t need an eCommerce platform, hence not using WooCommerce.

Thanks for your help!

Kev

icon

Best answer by Dov 17 May 2022, 23:23

View original

15 replies

Userlevel 7
Badge +61

Hi @Hol2022,

Thanks for sharing your question with us.

To achieve this, you would need to manually install the Klaviyo javascript to your WordPress site, which would allow you to create and add a form to your site. Once you do this, you can begin to collect subscribers from your site.

You can use the below snippet to manually install the Klaviyo onsite javascript necessary to publish Signup Forms on your WordPress site.

<script type="application/javascript" asyncsrc="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=PUBLIC_API_KEY"></script>

Make sure to replace PUBLIC_API_KEY with your Klaviyo account's 6 character Public API Key.

I hope that’s helpful!

Badge +1

Mr. Dov

 

i added this JS code in my header and footer plugin, how can i add a form in elementor its not working i tried, i added the 6 character Public API key,

 

On my site i just want to get clients email and auro respond with a welcome message and will follow the client later,  please your support.

 

Kind Regards

Userlevel 5
Badge +19

@shaiz 

I haven’t explored all the options of using Elementor forms with Klaviyo but will be trying soon.

 

Here is another thread that talks about WP plugins you can use: 

 

You could also use Zapier for this. You catch the Elementor form entry through a webhook and then send the data to Klaviyo. This I have already tested so I could create a submitted form metric event in Klaviyo, but you could use just for creating or updating a subscriber. 

https://elementor.com/help/zapier-elementor-integration/

Badge

I have used the script

 

<script type="application/javascript" asyncsrc="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=PUBLIC_API_KEY"></script>

 

Replacing the PUBLIC_API_KEY with my own and put it in the head section but it still doesn not connect to Klaviyo.

 

Is there any other place I need to put it?

 

Many thanks,

Mark

Userlevel 7
Badge +61

Hi @MarkCU & @shaiz,

Thanks for your follow-up notes.

Here are some other options you can try.

OPTION 1:

Add Klaviyo’s onsite javascript code as a snippet within WordPress

yof1aaCSpm4xICpCL52lwAJUfqUjh2AbpW2icGdBlEIhYeMc0EMdPn_VSJK-SvBbPh5E_MpvAD3k9PsVNVSVnffop_hue4DL5XWjH1WPhYxEmQt6jbQVA1N8ZRhWmQtmy6JbRnMm=s0

OPTION 2: 

Add Klaviyo’s onsite javascript code as a Footer widget within WordPress

O6PynoqH79fgkVw0Id-5b17DjsGe2SZket3XhdNSO0HM6I6rq9V9lCIFHpG9DlGg5IyB1--cglG_OtY1u8L9ZFWeUd6Q10FbfwigpMpnb1JfrLxzNI1WNj0YKONDBFb3CzJpM5IS=s0

OPTION 3:

Wrap the Klaviyo onsite javascript within a PHP Function, so that it can be added into your functions.php file, as explained here:

add_action('wp_footer', 'my_custom_footer_js'); function my_custom_footer_js() {   echo '<p><script async type="text/javascript" src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=PUBLIC_API_KEY"></script></p>'; }

OPTION 4:

If the PHP Function above does not work, then ultimately you will need to use a plugin such as this one

I hope that’s helpful. 

Badge +1

Hello! Follow up on this thread.. @Dov I was able to successfully embed a Klaviyo form using option number 3 (php function). However, since it is rooted in the footer I can not embed a form on a page where I do not display my footer and header (aka a landing page). Do you know any work around this?

Userlevel 7
Badge +36

Hi @drewyoga!

 

Taking over for Dov here - I think your best bet would be to use a code snippet plug-in like this.

 

If you’re not able to do that, then it may be useful to reach out to Wordpress Support and inquire about snippet-insertion options other than a php function, since they would likely have more insight into this.

 

Thanks,

- Brian

Userlevel 1
Badge +3

I’m having an issue with integrating with WordPress as well.

I’ve inserted the code snippet into the body using the Code Snippets plugin.

I keep receiving this error: “Script was not installed correctly”. I can see the code is on the site though.

Please advise.

I’m having the same issue, has anyone found a fix? I’ve tried all of the solutions, and the script appears in the source code of my pages, but Klaviyo is still returning errors that the script is not installed correctly.

Also, the documentation says that just installing the plugin should do this, but then above it is stated you have to do it manually. Which is it?

Unlike many others, our site https://gbwpro.com/ is focused on providing services rather than products, so we opted not to use WooCommerce. We're looking for guidance on how to seamlessly integrate Klaviyo without the WooCommerce framework. We want to leverage Klaviyo for email marketing and audience engagement tailored to our services. 

Our website primarily offers services rather than products, we decided against using WooCommerce for our setup. However, I'm eager to leverage Klaviyo's powerful features for effective email marketing. Following the recommended steps, I installed the Klaviyo plugin on boating safety WordPress site, obtained the API key, and configured the settings accordingly. 

I have successfully integrated Klaviyo with your WordPress site for your service-based business. Everything seems to be working smoothly, with form submissions being captured accurately. However, I've noticed an anomaly in the tracking data. I placed the Klaviyo tracking code correctly in the WordPress header using the "Insert Headers and Footers" plugin, the analytics tool is not reflecting page view events as expected.  

This script has a typo

<script type="application/javascript" asyncsrc="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=PUBLIC_API_KEY"></script>

asyncsrc should be async=””

 

and the script

<script type="application/javascript" async=”” src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=PUBLIC_API_KEY"></script>

To integrate Klaviyo with WordPress without using WooCommerce, you can follow these steps:

  1. Sign up for Klaviyo: If you haven't already, sign up for a Klaviyo account. You'll need this to access your Klaviyo API key.

  2. Install Klaviyo WordPress Plugin: Search for the Klaviyo WordPress plugin in the WordPress plugin repository and install it on your website. Alternatively, you can download the plugin from the Klaviyo website and upload it to your WordPress installation.

  3. Connect Klaviyo Account: Once the plugin is installed, navigate to your WordPress dashboard, and go to Settings > Klaviyo. Enter your Klaviyo API key to connect your Klaviyo account with your WordPress website.

  4. Set Up Forms: Klaviyo allows you to create various types of forms such as pop-ups, flyouts, embedded forms, and more. Create the forms you need in Klaviyo and customize them to match your website's design and branding.

  5. Embed Forms on Your Website: After creating your forms, copy the embed code provided by Klaviyo. Then, navigate to the appropriate section of your WordPress website (e.g., pages, posts, sidebar widgets) where you want to display the forms and paste the embed code.

  6. Set Up Automation: Klaviyo offers powerful automation features that allow you to send targeted emails based on user behavior. Set up automation workflows in Klaviyo to welcome new subscribers, follow up with leads, and engage with your audience.

  7. Track Performance: Monitor the performance of your email campaigns and forms in Klaviyo's dashboard. Track metrics such as open rates, click-through rates, and conversion rates to optimize your email marketing strategy.

  8. Test and Iterate: Continuously test different forms, email content, and automation workflows to optimize your email marketing efforts. Use A/B testing to compare different variations and identify what resonates best with your audience.

By following these steps, you can integrate Klaviyo with WordPress and leverage its powerful email marketing tools to grow your business and engage with your audience effectively.

Hi,

 

Can anyone help and let us know how to integrate Klaviyo onto Wordpress but not WooCommerce.  We used WP to develop our website but we are selling services, not products, so we don’t need an eCommerce platform, hence not using WooCommerce.

Thanks for your help!

Kev

Hey, Integrate Klaviyo with a WordPress site that doesn't use WooCommerce, first, sign up for a Klaviyo account and install the "Klaviyo for WordPress" plugin from the WordPress plugin directory. Activate the plugin, then go to the Klaviyo settings in your WordPress dashboard and enter your Klaviyo API key (found in your Klaviyo account under Account > Settings > API Keys). Create and customize a signup form in Klaviyo, copy the embed code, and paste it into your desired WordPress page, post, or widget area using the HTML editor or Custom HTML block. For advanced tracking, add the Klaviyo.js web tracking code to your site's header by editing the theme’s header.php file or using a plugin that inserts code into the header. This integration allows you to capture leads, manage email lists, and automate marketing for your service-based website effectively.

Regard,

Reply