第 113 期 设置缺货商品到货邮件提醒与收集客户邮箱
1 min read

第 113 期 设置缺货商品到货邮件提醒与收集客户邮箱

点击这里查看视频教程

<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>

提示:

  1. 商品需要设置跟踪库存、缺货后停止销售
  2. 如何查找 PUBLIC_API_KEY
  3. product_page_class:你的主题按钮 class
  4. 如何查找 List ID
  5. replace_anchor: 是否替换 Sold out 按钮
  6. subscribe_checked: 是否默认加入订阅列表

Klaviyo 官方文档(可不看):

  1. 设置 Flow
  2. 按钮安装教程