Hi, to help troubleshoot, please share the code/html of the button on the product page and the code for the out of stock provided by Klaviyo
<script src="https://a.klaviyo.com/media/js/onsite/onsite.js"></script>
<script>
var klaviyo = klaviyo || [];
klaviyo.init({
account: "PUBLIC_API_KEY",
platform: "shopify"
});
klaviyo.enable("backinstock",{
trigger: {
product_page_text: "Notify Me When Available",
product_page_class: "btn",
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"
}
});
</script>
I see one line of code that needs to be udpated:
account: "PUBLIC_API_KEY"
Replace PUBLIC_API_KEY with the actual key, which can be found here:
https://help.klaviyo.com/hc/en-us/articles/115005062267-How-to-Manage-Your-Account-s-API-Keys
Thanks for helping. yes, it was replaced when I installed it. but not showed notify me button.
I heard that some of Shopify's theme does not work properly, I am wondering if something like that, Or need any additional coding for the subscribe pop-up.
I have the same problem. Has anyone figured this out?
I’m seeing this error in the Javascript Console;
Unhandled Promise Rejection: SyntaxError: The string did not match the expected pattern.
promiseEmptyOnRejected — century:403
And also this
Failed to load resource: the server responded with a status of 404 (Not Found)
https://cdn.shopify.com/shopifycloud/shop-js/v1.0/client.js.map
Hi @peter586,
May I ask what Shopify theme you are using? As my colleague David mentions here, the back-in-stock snippets that we provide are only supported in Shopify’s basic free themes:
As for the errors, I would recommend reading through these threads as a start, since the back-in-stock button can malfunction as a result of several different things:
Best,
Brian