Published on: January 17, 2025
Published by Marty Paukstys, founder of D2CEBL. 20+ years of Google PPC & Analytics experience. Google Ads Search and Google Analytics certified.
1. Create a Google Tag Manager Account
- Visit Google Tag Manager.
- Click "Create Account".
- Fill in the following details:
- Account Name: Your company or project name
- Country: Your location
- Container Name: Website URL or project name
- Target Platform: Choose "Web"
- Click "Create" and accept the terms of service.
2. Get Your GTM Container Code
- Copy the two pieces of code provided:
- Code 1 (Head): Place in the
<head>
section of your site. - Code 2 (Body): Place immediately after the opening
<body>
tag.
3. Add GTM Code to Your Website
- For HTML Websites:
- Paste Code 1 in the
<head>
section of every page. - Paste Code 2 immediately after the
<body>
tag. - Save and upload the files to your server.
- For CMS Platforms:
- WordPress:
- Use plugins like "Insert Headers and Footers" or "Google Tag Manager for WordPress".
- Paste the code into the provided fields.
- Shopify:
- Go to Online Store > Themes > Actions > Edit Code.
- Paste Code 1 in the
<head>
section of theme.liquid
. - Paste Code 2 after the opening
<body>
tag.
4. Publish Your GTM Container
- Go back to the GTM interface.
- Click "Submit" > Add version name/description (optional) > Click "Publish".
5. Verify Installation
- Use the "Tag Assistant (Legacy)" Chrome extension to check GTM activity.
- Alternatively, open the browser console and search for
dataLayer
to confirm.
6. Add Tags, Triggers, and Variables
- Create tags for tracking (e.g., Google Ads or Google Analytics).
- Test tags using "Preview Mode" in GTM.
- Save and publish changes after testing.
7. Regular Maintenance
- Review and update tags periodically.
- Monitor GTM activity using connected tools like Google Analytics.
- Test GTM functionality after major website updates.