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.1

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 website2


3. Click ā€œAdd a New Tagā€

In the GTM workspace, click the button labeled ā€œAdd a new tagā€.3


4. Edit the Tag Configuration

In the new tag setup window:

Click the pencil icon inside the ā€œTag Configurationā€ box to open tag options4


5. Select ā€œCustom HTMLā€ as the Tag Type

From the list of tag types, choose Custom HTML.5


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.6


7. Configure the Trigger

Click the pencil icon next to the ā€œTriggeringā€ section.7


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.8


9. Rename the Tag

At the top of the tag window, click ā€œUntitled Tagā€ and rename it to something clear like: MagicBlocks Tag9


10. Click ā€œSaveā€ and Publish

Click Save to finalize the tag

Then hit ā€œSubmitā€ in the top-right to publish the changes to your site10


šŸŽ‰ 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.

Was this article helpful?