@elliott
Custom HTML code can be included in Google Tag Manager using the Custom HTML tag type. Here's a step-by-step explanation of how it works:
- Log in to your Google Tag Manager account and navigate to the desired container.
- Click on "Tags" in the left-hand sidebar.
- Click on the "New" button to create a new tag.
- In the "Choose tag type" section, select "Custom HTML".
- Give your tag a descriptive name to help you identify it later.
- In the "HTML" field, you can write or paste your custom HTML code. This code can include various functionalities like tracking scripts, pixel codes, or other JavaScript functions.
- Optionally, you can use variables and macros within your HTML code to dynamically populate data.
- In the "Triggering" section, you define when the tag should fire. You can set up triggers based on various conditions, such as page URL, clicks, or form submissions.
- Save the tag by clicking on the "Save" button.
- To publish your changes, click on the "Submit" button in the upper-right corner of the Google Tag Manager interface.
Once the tag is published, the custom HTML code will be added to the website pages. It will execute based on the defined triggering conditions, allowing you to track events, customize user experience, or integrate various third-party tools without making direct changes to your website's code.