Install with Google Tag Manager
Ready to deploy your MagicBlocks AI Agent across your entire website using Google Tag Manager? GTM is a powerful, centralized way to manage scripts, perfect for teams, marketers, and multi-site installs.
š§ What Youāll Need Before You Start
To complete this setup, make sure you have:
ā
A published AI Agent in MagicBlocks
ā
Your MagicBlocks Embed Code (check here for the step-by-step to get the code Go Live: Embedding Your Al Agent to a Website )
ā
Access to your Google Tag Manager account
š Step-by-Step: How to Embed Your AI Agent with Google Tag Manager
1. Copy the Embed Code from MagicBlocks
Start in your MagicBlocks dashboard:
Go to Agents
Select the Agent you want to go live with
Navigate to the Go Live
Copy the code to Embed.
This is the script youāll paste into Google Tag Manager to activate the Agent on your site.
š„ This video will explain the step-by-step process on how to embed your AI Agent with Google Tag Manager:
2. Open Your Google Tag Manager Dashboard
Log in to Google Tag Manager, then:
Select the container associated with your website
3. Click āAdd a New Tagā
In the GTM workspace, click the button labeled āAdd a new tagā.
4. Edit the Tag Configuration
In the new tag setup window:
Click the pencil icon inside the āTag Configurationā box to open tag options
5. Select āCustom HTMLā as the Tag Type
From the list of tag types, choose Custom HTML.
6. Paste the MagicBlocks Embed Code
In the HTML editor:
Paste the MagicBlocks embed code you copied earlier
This code will inject your AI Agent across your site.
7. Configure the Trigger
Click the pencil icon next to the āTriggeringā section.
8. Choose āAll Pagesā as the Trigger
From the trigger list, select āAll Pagesā. This tells GTM to fire the MagicBlocks script across your entire site.
9. Rename the Tag
At the top of the tag window, click āUntitled Tagā and rename it to something clear like: MagicBlocks Tag
10. Click āSaveā and Publish
Click Save to finalize the tag
Then hit āSubmitā in the top-right to publish the changes to your site
š Your AI Agent Is Now Live!
Your MagicBlocks Agent will now appear across your website wherever the Google Tag Manager container is installed.
š Start Chatting & Testing
Visit your website
Confirm the MagicBlocks chat icon appears (bottom right or sidebar, depending on your settings)
Start a test conversation and verify your lead capture, qualification flow, or calendar booking setup
ā ļø If the AI Agent is not visible:
It may be blocked by an ad-blocker. Try disabling browser extensions or testing in an incognito window.