Getting Started
To embed your marketplace you must have the following on Wix.com:
Premium Plan
Custom Domain
Tutorial
Use Wix's custom element tool to add the Builtfirst embed code.
Learn more about custom elements here: https://support.wix.com/en/article/wix-editor-adding-a-custom-element-to-your-site.
Embed Code
⚠️ You must replace the "[your-marketplace]" line in the code with your marketplace's domain.
Add the code below to embed your marketplace:
var BFMarketplaceURL = 'https://[your-marketplace].builtfirst.com';
function scriptLoaded(){
Builtfirst.embed({baseUrl: BFMarketplaceURL,autoHeight: true, containerId: "bfContainer"});
}
function getScript(){
const script = document.createElement("script");
script.src= BFMarketplaceURL+'/scripts/embed.js'
script.onload = scriptLoaded
return script
}
function getContainer(){
const div = document.createElement("div");
div.id="bfContainer"
return div
}
class BuiltfirstEmbed extends HTMLElement {
constructor() {
super();
}
connectedCallback() {
this.appendChild(getContainer());
this.appendChild(getScript());
}
}
customElements.define("builtfirst-embed", BuiltfirstEmbed);