Adding Custom Scripts to Stencil Themes

Custom Scripts

Many third-party applications and services rely on the ability to inject custom scripts into a website’s footer in order to function. WIth Stencil, BigCommerce has made adding these scripts as easy as copying and pasting them into your control panel.


Can I add custom code outside of my site’s footer? It is possible to paste code in other template files using etf. Keep in mind that the script you are pasting may not be compatable with the Stencil framework. See Getting Help for avenues of assistance.

1. Copy the script provided by the third-party app or service.

2. Go to Storefront Design › Design Options , then click the Scripts tab.

3. Paste the script into the text area labeled Footer, then click Save.

Scripts tab in Design Options


Have more than one script? Simply paste them below any other saved scripts.

Handlebars in Stencil Footer

In addition to HTML and custom scripts, you can paste the templating language Handlebars into the footer of Stencil themes. This allows for more robust customizations.

About Handlebars

Handlebars is a templating language used to develop and customize Stencil themes. For example, you can use Handlebars to reference theme-wide variables like your store’s name or logo. Third-party apps could use Handlebars to reference customer information, in order to display loyalty offers specific to the person logged in.

To learn more about using Handlebars in Stencil themes, see our developer documentation on Developing with Handlebars.

Conversion Tracking Scripts

Conversion tracking scripts can still be added to Stencil themes using the methods described in the following articles:

Go to Design Options in my store

Getting Help

Don't feel comfortable adjusting your design or want to work with an expert? Check out our BigCommerce Partner Directory or ask your question in the BigCommerce Community Design Group for assistance. Due to our Design Policy, our Techincal Support is unable to edit code or make design changes.

Was this article helpful?