Analytics & Reports
Analytics

Mounting

Once Storefront tags are added to the HTML and Storefront is configured, the tags must be mounted. After your call to create a new storefront({ ... }) instance with configuration passed in, make calls to storefront.mount(tag) where tag is the tag you wish to mount to the page.

JS
// index.js
new storefront({
  // Your configuration
});

storefront.mount('<tag_name>');

Mounted Storefront tags will also mount any Storefront tags inside of them. In the following example, only <gb-container> needs to be mounted:

HTML
<!-- index.html -->
<gb-container>
  <gb-navigation></gb-navigation>
</gb-container>
JS
// index.js
new storefront({
  // Your configuration
});

storefront.mount('gb-container');

Mount All

There is also a shorthand form for mounting all tags.

JS
// index.js
new storefront({
  // Your configuration
});

storefront.mount('*');