Installation Guide
Prerequisites
Before installing, make sure:
- You are an active Buddi client with a valid subscription.
- A Buddi Support Specialist has enabled the SEO E-Commerce option for your account.
⚠️ Note: Buddi can also be installed using a script tag, but we strongly recommend using NPM. This ensures you get the benefits of Server-Side Rendering (SSR), which is key for SEO success.
Install via NPM (Recommended)
Step 1. Install the main Buddi NPM package
npm i git+https://oauth2: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@github.com/clearleafinc/seo-menu-main-module.git#master
Step 2. Import and configure
Once installed, you can use main.js for configuration and product data loading.
import Buddi from "buddi-seo-ecommerce/main.js";
Buddi.setUp({
storeId: 1,
modules: {
cart: true,
profile: true,
auth: true,
}
});
Step 3. Multi-store support
If you are running multiple stores, you can switch between them:
Buddi.useStore(id);
Alternative Installation – Script Tag
We only recommend using the script tag method if:
- SEO is not a priority, or
- You are testing the platform in the early design stage.
Step 1. Add the main script
Place this script at the bottom of your <body> tag:
<script src="https://staticfiles.buddi.io/js/seo-ecommerce/main.js"></script>
Step 2. Initialize Buddi
Add the following setup script:
<script>
Buddi.setUp({
storeId: {storeId}, // Replace with your store ID
lsKeyPrefix: 'buddi', // Optional: Local storage key prefix (default = 'buddi')
});
</script>
And that’s it! 🎉 You’re ready to go.