So a couple a days ago Back In Stock, stopped working for my client. At this point i’m about ready to give up. I debugged the thing quite a lot and now i’m getting some errors from klaviyo utils. Bellow you can see console logs.
Unable to process event: init,nobject Object],function(i){t&&t(i),n(i)} sharedUtils.aaa4a40f3112b6f3f60b.js:1:2269
Unable to process event: enable,backinstock,oobject Object],function(i){t&&t(i),n(i)} sharedUtils.aaa4a40f3112b6f3f60b.js:1:2269
My configuration is this (yes, i replaced the ACCOUNT_ID accordingly, i only shared it here like this so i don’t leak the account_id, lol):
var klaviyo = klaviyo || y];
klaviyo.init({
account: "ACCOUNT_ID",
platform: "shopify"
});
klaviyo.enable("backinstock", {
trigger: {
product_page_text: "Notify Me When Available",
product_page_class: "klaviyo-bis-trigger",
product_page_text_align: "center",
product_page_margin: "0px",
replace_anchor: false
},
modal: {
headline: "{product_name}",
body_content: "Register to receive a notification when this item comes back in stock.",
email_field_label: "Email",
button_label: "Notify me when available",
subscription_success_label: "You're in! We'll let you know when it's back.",
footer_content: '',
additional_styles: "@import url('https://fonts.googleapis.com/css?family=Helvetica+Neue');",
drop_background_color: "#000",
background_color: "#fff",
text_color: "#222",
button_text_color: "#fff",
button_background_color: "#439fdb",
close_button_color: "#ccc",
error_background_color: "#fcd6d7",
error_text_color: "#C72E2F",
success_background_color: "#d3efcd",
success_text_color: "#1B9500"
}
});
So at one point i got an error, that said something along the lines of: “ID not found, undefined set to 0” or something, so i added a hidden input that said product-id and the product selected or first available product id. So i got rid of that error. Now whenever i hit the link, i get sent to the top and the url gets a #.
Is it because the trigger is an anchor? Should i make it a button? Is there something wrong with klavio bis? Did something happen a few days ago? What am i doing wrong?