If you need to install a tracking script (such as Google Ads, Meta Pixel, LinkedIn Insight Tag, or any custom code) on all pages of your website using Google Tag Manager (GTM), follow the steps below.
Log into Google Tag Manager
Visit tagmanager.google.com and open the container for your website.
Create a New Tag
In the left-hand menu, click Tags, then click New.
Configure the Tag
Click Tag Configuration.
Select Custom HTML as the tag type.
Paste Your Tracking Script
Copy and paste the entire tracking script into the provided HTML field.
Add a Trigger for All Pages
Click Triggering.
Select All Pages (under the built-in Page View triggers).
Optional: Support Document Write
If your script requires document.write, check the box labeled Support document.write (use with caution).
Save the Tag
Give your tag a descriptive name, such as "Tracking Script – All Pages", and click Save.
Preview the Tag
Click Preview to test your changes in debug mode. Visit your website to ensure the tag fires correctly.
Publish the Tag
Once you've confirmed the tag works as expected, click Submit and then Publish to make it live.