How to Add a Script Using Google Tag Manager
Introduction
Google Tag Manager (GTM) acts as a centralized control panel for your website's code snippets. Think of GTM as an empty smart-folder installed on your website; instead of asking a web developer to manually insert new code every time you want to add a tool—like a Facebook Pixel to track ad clicks or a live chat widget to talk to customers—you simply drop that code into your GTM folder.
Note: If you haven't configured your Google Tag Manager key in your eDirectory, please follow the steps outlined in this article before attempting to add a script/tag: How to Configure Google Tag Manager.
Once GTM is connected to your site, you can quickly deploy these scripts (known as tags) to track user behavior, link marketing platforms, and add custom features without altering your website's core code.
How to Deploy a Custom Tag
1. Create a New Tag:
- In your Google Tag Manager dashboard, navigate to the "Tags" section in the left-hand menu.
- Click the "New" button to create a new tag.

2. Configure a Custom HTML Tag:
- Click on the "Tag Configuration" section to choose the type of tag you want to create.

- To implement custom scripts, select the "Custom HTML" tag type from the available options.

- Provide a descriptive "Name" for your tag (e.g., "Facebook Pixel").
- In the "HTML" field, paste the script code that you want to deploy on your website (e.g., your Facebook Pixel base code or a custom tracking script).
- Under the "Triggering" section, select "All Pages" to ensure that this script is applied across your entire website.
- Click the "Save" button to finalize the tag configuration.

3. Submit and Publish Your Tag:
- After creating and saving your tag, click the "Submit" button located in the top right corner of your GTM dashboard to apply the changes to your live website.

- In the "Submit Changes" window, provide a descriptive "Version Name" (e.g., "Added Facebook Pixel") and a brief "Version Description" (optional, for more detailed notes on the changes).
- Click the "Publish" button to deploy the newly created tag to your eDirectory website.

- Upon successful publication, a confirmation message will appear, indicating that the tag is now live on your site.

Conclusion
By using GTM for custom HTML tags, you maintain a clean, organized, and fast-loading website while retaining full control over your third-party tools. Successfully publishing your workspace instantly pushes the new features or tracking codes live, allowing you to seamlessly enhance your site's functionality with just a few clicks.