Introduction:
In this article, You’ll learn ‘How to install back-in-stock flow snippet for shopify.
CLICK HERE to check out detailed guide about back in stock flow in klaviyo.
Let’s dive in!
How to install back-in-stock snippet for shopify?
Install the snippet
First step in our guide to set up back in stock flow klaviyo for shopify is adding the code snippet below to your theme.liquid file. These instructions apply to both Shopify 2.0 users and those using vintage themes.
- From your Shopify Admin click Online Store > Themes.
- Click your theme’s Actions dropdown and select Edit Code.
- Search for the theme.liquid file, and click to open it in the editor.
- Copy the JavaScript snippet below and paste it into your theme.liquid file directly above the
</body>
tag.
<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>
You’ll need to replace the PUBLIC_API_KEY text [5ht lines in the above snippet] with your Klaviyo public
API key. Learn how to find your account’s public API key.
If you use multiple Klaviyo accounts, make sure you are using the key from the correct account. Copy and paste your key into the snippet.
You can stop here and save your theme.liquid file to use the default configuration.
Hope you loved this article ‘How to install back-in-stock flow snippet for shopify’.
Wanna take your E-commerce business to next level with proven email marketing strategies? You’re just ONE step away. DM ‘Klaviyo consultation’ at info@alixemail.com” or WhatsApp us at : +1(929)5895851
Don’t forget to subscribe our YouTube channel [Marketing Chamber ] for klaviyo tutorials. For Urdu/Hindi klaviyo tutorials click here. For English klaviyo tutorials click here.”
FAQs:
- In Klaviyo, select the Flows tab.
- Click Create Flow, then Create from Scratch.
- Name your flow, then click Create Flow.
- In the flow builder, choose the trigger option Takes an Action. …
- Directly after the trigger, drag in a Back in Stock Delay.
- Click Create Flow and name your back in stock flow.
- Once in the Visual Flow Builder, choose the trigger option Takes an Action. …
- The next component you’ll want to drag in — directly after the trigger — is the Back in Stock Delay.
7] How does Klaviyo’s back-in-stock flow work for Shopify?
Answer: This question seeks an explanation of the functionality and the process of setting up and using the back-in-stock flow within Klaviyo for a Shopify store.
8] Can I customize the notifications in Klaviyo’s back-in-stock flow?
Answer: People often want to know if they can tailor the messages and notifications to match their brand and communication style.
9] What is the best way to encourage subscribers to sign up for back-in-stock notifications?
Answer: Store owners want to know how to effectively build their subscriber list for back-in-stock notifications. This might include strategies to entice customers to subscribe.
10] How can I track the effectiveness of the back-in-stock flow in Klaviyo for Shopify?
Answer: Users often inquire about analytics and metrics to measure how well the back-in-stock flow is performing and making an impact on sales.
11] Are there best practices for managing inventory with Klaviyo’s back-in-stock flow on Shopify?
Answer: This question focuses on how to optimize inventory management and use the back-in-stock flow to prevent stockouts and maximize sales.
12] How to set up back in stock flow in klaviyo from scratch?
Answer: This is a complete guide to set up back in stock flow klaviyo for shopify.