Example of third party, or custom scripts include:
- Analytics software
- Chat boxes
- Marketing programs
- Buy now, pay later widgets
In this Article
Add a Custom Script
To add a custom script to your webstore:
Important: Maropost Commerce does not provide support for third party scripts so please use at your own risk.
-
In your Maropost Commerce control panel select Settings & tools > All settings & tools
-
In the Settings & tools page, select Custom Scripts
-
The Custom Scripts page shows all current custom scripts installed. You can edit existing scripts here or select New to add a new custom script.

-
Enter the Name of the script you are installing. This is an internal reference only.

-
Paste your code into the relevant section.
Tab | Code Output Location |
---|
Page Header | HEAD section of every page |
Page Footer | Above the closing BODY tag on every page except purchase confirmation |
Registration Confirmation | The page after a new customer registers for an account |
Purchase Confirmation (Thank You Page) | Last page after checkout |

-
When complete, click the Save button.
Please Note: Changes to a custom script require you to authenticate your access. Click the Send Token Now button and an email will be sent to you with a security token. Copy the token and paste it into the verification field. Click the Verify Token button and your changes can be saved. The token will last two hours in case you need to change multiple scripts.
Your custom script is now installed and ready to function on your webstore.
Remove or Deactivate a Custom Script
Scripts can be deactivated for testing, or removed entirely if they're no longer needed. To remove or deactivate a custom script:
-
In your Maropost Commerce control panel navigate to Settings & tools > All settings & tools.
-
In the Settings & tools page, select Custom Scripts.
-
The Custom Scripts page shows all current custom scripts installed. Select the checkbox next to the custom script you want to remove or deactivate.
-
Click the With x Selected button, and click Mark as Inactive or Delete.
Your custom script is now removed or deactivated.
Add a Tracking Script to the Checkout Page
Tracking scripts can be added in the page footer so that they can run on your webstore checkout page. As the footer is used across your website, it's important to target the checkout page specifically with the below code:
[%if [@config:current_page_type@] eq 'checkout'%]
<!-- Script here -->
[%/if%]
Important: Adding a custom script to your checkout is done at your own risk. Always test the checkout after adding a script, and if problems occur, make the script inactive.
Related Articles