Solved

Klaviyo Direct integration with Consent sms and Email to different list

  • 25 August 2021
  • 3 replies
  • 377 views

Userlevel 1
Badge +2

Hey Guys I’m trying to do direct integration with laravel using klaviyo on site script,<script type="application/javascript" async src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=PUBLIC_API"></script>.

I want it to work same as wordpress woocommerce plugin does. Basically I’m looking for something where We can add users to its Appropiate Different lists.(for eg: If they have checked subscibe to newletter then they go on Newsletter list and when they check on sms they land on sms list).

Is this even possible without the plugins and with direct integration?Any Help and suggestions would be really appreciated.

icon

Best answer by David To 26 August 2021, 16:02

View original

3 replies

Userlevel 7
Badge +60

Hello @MeetAmin,

Thanks for sharing your question with the Klaviyo Community!

The Klaviyo.js web tracking snippet you are mentioning serves several purposes, including tracking the Active Onsite metric and to allow Klaviyo to publish signup forms on a website. Although this snippet serves as the foundation for a number of other features, this snippet alone cannot add contacts to a specific list nor will it replace the full scope of what is capable within a tradition ecommerce integration; including the WooCommerce plugin connection. 

Since Laravel is not an app that Klaviyo has developed a native integration with, I would suggest seeing if Laravel has created their own connection to Klaviyo. Alternatively, you can also create your own custom connection between these two apps by leveraging Klaviyo’s API. If you decide to do this, I would suggest working with a developer finding a Klaviyo partner and providing them with the following API documentation Klaviyo offers:

In addition, if you were using third party signup forms on your website, you can redirect those subscribers to a Klaviyo list by creating a redirect as described in the How to Redirect Existing Signup Forms to Klaviyo Help Center article. The only caveat to this is that if you were trying to collect SMS consent, from a third party signup form, you’ll need to do so by utilizing Klaviyo’s API as detailed in the Guide to Collecting SMS Consent via API article. Currently, Klaviyo only allows collecting SMS consent either through a Klaviyo signup form, text-to-join, consent at checkout, or through the API. I would suggest taking a look at the Guide to Collecting SMS Consent Help Center article on the various ways you can collect SMS consent and start your SMS marketing journey!

I hope this helps!

David

Userlevel 1
Badge +2

Hey everyone, After a lot of time I found a way to add the users in their appropriate lists(with green checks next to email and number --same as woocom). Basically what my code does it when you check the consent for email it’ll send it to its email’s list, then when we check only sms it sends it to different list...Not hard correct?Correct it isn’t that hard to just send them to different list but where we get stuck is with consent status (Green check next to email and Phonenumber). After looking around here is the code which would do it. Remember why klaviyo people say subscibe endpoint means the curl or whatever url it is has to be subscribe url like this. Feel free to suggest or ask if anyone is having issue with custom integration or with laravel(php). @david.to 

Userlevel 7
Badge +60

Hey @MeetAmin,

Really glad to hear you were able to find a solution to your issue! Also really appreciate you sharing your solution with the Klaviyo Community as i’m sure this would certainly help other members in the future!

Thanks for being a part of the Klaviyo Community!

David

Reply