Plugin: Clickfunnels to Klaviyo Integration

klaviyo
plugin
clickfunnels

(sin) #23

hmm… that’s probably from the OLD plugin :slight_smile: it got updated so you don’t really need an API key at all.

The Api Key is not needed anymore :slight_smile: but instead the LIST ID is still required.

That’s exactly what it means :slight_smile: the plugin above needs almost ZERO coding, and the inputs I mentioned were the Clickfunnels Inputs you want, as you said only need First Name and email, then add those that’s it… but DO NOT change the CODE at all (you don’t need to)…

The code plugin, above should be working for all cases… no matter how many basic input fields you might have…

PS. the code plugin above DOES NOT support custom fields, since klaviyo itself has a weird way of handling those… but I’m open to suggestions on that aspect.


(Meghan Dicklin) #24

Thanks so much Yassine! I did get it working. One last question, will the plugin handle directing a user to a new URL so they can be taken to the thank you page in a funnel?


(sin) #25

hmm… It won’t interfere with the existing flow you have on Clickfunnels :slight_smile:

As long as your funnel is flowing correctly before adding the plugin, afterwards it won’t be affected :slight_smile:


(Edy Chandra) #26

Hi yassine,

Inside the var LIST ID =“your list id”; You will put Klaviyo Public API key right?

Because I notice they don’t have list id, only API Key


(isoft) #27

NO! that should be the List ID from Klaviyo (usually something like KB45Sd4…etc).

And you do not need any API key… only the list id.


(Edy Chandra) #28

My bad… I just found it. It is in List&Segments => Setting Thanks! :slight_smile:


(bhatt) #29

try the following code for the email id and name only.
Copy the code and paste it in setting ->tracking code->header code.

Blockquote

var LIST_ID = “your list id”;
var API_KEY = ‘your api key’;

function send_to_klaviyo() {
var email="", fname="";

var emailbox = document.getElementsByName(“email”)[0];
if (emailbox == null)
return; // no email :o
email = emailbox.value;

var fnamebox = document.getElementsByName(“first_name”)[0];
if (fnamebox != null)
fname = fnamebox.value;

var properties = {
a:API_KEY,
g: LIST_ID,
“email”: email,
“$first_name”: fname

};

$.post(“https://manage.kmail-lists.com/ajax/subscriptions/subscribe”,properties).done(function(d){
console.log(“subscription success…!”);
});
}

window.addEventListener(“load”, function() {
var divs = document.getElementsByTagName(“div”);
for (i = 0; i < divs.length; i++)
{
var div = divs[i];
if (div.getAttribute(“data-title”) == “optin button” || div.getAttribute(“data-de-type”) == “button”) {
div.onclick = function() {
// Send the lead to Klaviyo
send_to_klaviyo();
};
}
}
});

Blockquote