第 113 期 Shopify 店铺设置缺货商品到货邮件提醒与收集客户邮箱
通过添加缺货商品到货提醒功能,可以在商品到货后提醒客户下单,提高店铺订单量,提升销售额,并和客户保持联系。
<script src="https://a.klaviyo.com/media/js/onsite/onsite.js"></script>
<script>
var klaviyo = klaviyo || [];
klaviyo.init({
account: "你的 PUBLIC_API_KEY",
//list: "你的 Klaviyo List ID",
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: true
},
modal: {
headline: "{product_name}",
//newsletter_subscribe_label: "Add me to your email list.",
//subscribe_checked: false,
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>
提示:
- 商品需要设置跟踪库存、缺货后停止销售
- 如何查找 PUBLIC_API_KEY
- product_page_class:你的主题按钮 class
- 如何查找 List ID
- replace_anchor: 是否替换 Sold out 按钮
- subscribe_checked: 是否默认加入订阅列表