Code Snippets

Merchant’s Code Snippets module allows you to add custom JavaScript code to your global header, body, or footer without having to edit your theme’s functions.php file.

Note that this is a developer feature — only add custom code snippets if you have coding knowledge. The module currently only accepts JavaScript code; however, we plan to support CSS in the future as well.

Below, you can learn how to configure and activate the module.

1. Open the Code Snippets Module

Open your Merchant dashboard by clicking the Merchant menu in the left sidebar of your WordPress admin area.

Under the Improve Experience heading, click the Code Snippets module to open its settings page:

Location of the Code Snippets module on the Merchant dashboard, annotated screenshot

2. Add the Code Snippets

On the module’s Settings page, you’ll find three fields where you can add your custom code snippets:

  • Header – These scripts will be added to the <head> section of the HTML page.
  • Body – These scripts will be added just below the opening <body> tag.
  • Footer – These scripts will be added just above the closing </body> tag.
Code Snippets module page, all options, screenshot

Once the code snippets are added, click the Save button in the top-right corner of the page.

3. Enable the Code Snippets Module

If everything looks OK, click the Enable button at the top of the page to activate the module:

Merchant's Code Snippets module, Enable button, screenshot