Track visits, conversions, and other metrics in your checkout flow by using a tag manager. A tag manager such as Google Tag Manager allows you to manage your tracking scripts in one place and set advanced tracking events without having to constantly update your Firmhouse project configuration. Please note: Adding custom analytics code is only available for Firmhouse projects that have a custom domain configured. We’ll use Google Tag Manager as a sample in the following instructions, but you can use this article to embed any tag manager of your preference into your Firmhouse projects.Documentation Index
Fetch the complete documentation index at: https://docs.firmhouse.com/llms.txt
Use this file to discover all available pages before exploring further.
Adding tag manager integration code to your project
You can easily add the custom JavaScript code of your tag manager on your Firmhouse Checkout flow.Steps
- In your Firmhouse project, go to Checkout Flow in the sidebar and click on Preferences from the submenu that shows up.
- Copy the tag manager code that needs to appear in the
<head>of the page into the Header field. - Copy the tag manager code that needs to appear in the
<body>of the page into the Body field. - Scroll to the bottom and click Update project.
GTM-XXXX should be replaced with your actual GTM container ID.
View the checkout flow on your custom domain to make sure that your integration code works and that your tracking scripts are loaded in by your tag manager.
Add scripts for the Self Service Center separately
Within the Firmhouse Self Service Center, it’s also possible to add custom code. This allows for separate tracking scripts and customizations. Within the Self Service Center menu, add your code to the Header or Body fields.Removing tag manager integration code from your project
Steps
- In your Firmhouse project, go to Checkout Flow in the sidebar and click on Preferences from the submenu that shows up.
- Clear the tag manager code from the Header field.
- Clear the tag manager code from the Body field.
- Scroll to the bottom and click Update project.