Solved

Integration to Wordpress

  • 17 May 2022
  • 5 replies
  • 646 views

Badge

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

5 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

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 3
Badge +7

@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/

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. 

Reply