Google Tag Manager Tutorial: Install and Configure Tags

Google Tag Manager is one of the most powerful tools in a digital marketer’s toolkit, yet many Singapore businesses either do not use it or have it poorly configured. GTM acts as a centralised management system for all your website tracking codes, eliminating the need to modify your website’s source code every time you want to add or update a tag.

In Singapore’s fast-paced digital landscape, being able to deploy tracking tags quickly and accurately is a significant competitive advantage. Whether you need to install Google Analytics 4, set up Facebook Pixel, track form submissions, or implement conversion tracking for Google Ads campaigns, GTM allows you to do it all from a single interface without relying on a developer for every change.

This google tag manager tutorial covers everything from initial account setup to advanced tag configurations. We will walk through the process step by step, with practical examples relevant to Singapore businesses, so you can start managing your tags with confidence.

What Is Google Tag Manager and How It Works

Google Tag Manager is a free tag management system that allows you to deploy and manage marketing and analytics tags on your website without directly editing the code. Think of it as a container that sits on your website — once the container code is installed, you can add, modify, or remove any tracking tag through the GTM web interface.

The core concept behind GTM is the separation of tag management from website development. Before GTM, adding a new tracking pixel or analytics code required a developer to modify the website’s HTML, test the changes, and deploy them. This process could take days or weeks. With GTM, a marketer can add a new tag, test it using the built-in preview mode, and publish it live within minutes.

GTM works through three core components. 태그 are snippets of code that execute on your website, such as the Google Analytics tracking code or the Facebook Pixel. Triggers define when tags should fire — for example, on every page load, when a form is submitted, or when a user clicks a specific button. Variables are dynamic values used by tags and triggers, such as the page URL, click text, or a form field value. Understanding how these three components interact is fundamental to mastering GTM.

For Singapore businesses managing multiple marketing channels — from SEO to paid ads to social media marketing — GTM provides a unified way to handle all tracking requirements efficiently and reliably.

Step 1: Set Up Your GTM Account and Container

Setting up your Google Tag Manager account takes just a few minutes. Navigate to tagmanager.google.com and sign in with your Google account — ideally the same account you use for Google Analytics and Google Ads, as this simplifies integration later.

Create an account: Click “Create Account” in the upper right corner. Enter your account name — use your company name, for example “MyBusiness Pte Ltd.” Select “Singapore” as your country from the dropdown menu. Under “Container Setup,” enter your container name — typically your website domain, such as “mybusiness.sg.” Select “Web” as the target platform. If you also have a mobile app, you can create additional containers for iOS and Android later. Click “Create” and accept the Terms of Service.

Understand the account structure: GTM uses a hierarchical structure. An account represents your business and can contain multiple containers. Each container corresponds to a website or app and holds all the tags, triggers, and variables for that property. For most Singapore SMEs with a single website, one account with one container is sufficient. Agencies managing multiple clients should create separate accounts for each client to maintain clear boundaries.

Set up user permissions: If you work with a team or a digital marketing agency, configure appropriate access levels. Go to Admin, then User Management. You can grant access at the account level or container level. Permission levels include Read (view only), Edit (make changes but cannot publish), Approve (review and approve changes), and Publish (deploy changes to live site). For agencies, granting Publish access to the container allows them to manage tags independently.

Step 2: Install the GTM Container on Your Website

After creating your container, GTM provides two code snippets that need to be added to your website. This is typically the only time you need to touch your website’s code directly — after this, all tag management happens through the GTM interface.

Locate the container snippets: In your GTM workspace, click on the container ID at the top of the page (it starts with “GTM-” followed by alphanumeric characters). This opens a window showing two code snippets. The first snippet is a script tag that should be placed as high as possible in the head section of every page. The second snippet is a noscript tag that should be placed immediately after the opening body tag on every page.

Install on WordPress: For WordPress websites, you have two options. The manual approach involves editing your theme’s header.php file and pasting the two snippets in the correct locations. However, a safer approach is to use a plugin such as “GTM4WP” or “Insert Headers and Footers.” These plugins provide dedicated fields for the GTM snippets, and the code persists even when you update your theme. Simply paste your GTM container ID into the plugin settings, and it handles the rest.

Install on Shopify: For Shopify stores, go to Online Store, then Themes, and click “Edit code.” Open the theme.liquid file. Paste the first GTM snippet just before the closing head tag, and paste the second snippet immediately after the opening body tag. Save the file. This covers all pages of your Shopify store.

Install on custom websites: For custom-built websites common among Singapore enterprises, work with your web development team to add both snippets to the site template or master layout file that generates all pages. Ensure the snippets appear on every page, including landing pages and subdomains.

Verify the installation: Use the Google Tag Assistant Chrome extension to verify that GTM is properly installed. Visit your website with the extension active — it should detect your GTM container and show a green checkmark. Alternatively, right-click on your webpage, select “View Page Source,” and search for your GTM container ID to confirm the code is present.

Step 3: Understand Tags, Triggers, and Variables

Before creating your first tag, it is important to understand how tags, triggers, and variables work together. This conceptual understanding will save you time and prevent errors as you build out your tracking setup.

태그 are the tracking codes you want to deploy. GTM supports a wide range of tag templates, including Google Analytics 4, Google Ads Conversion Tracking, Google Ads Remarketing, Facebook Pixel, LinkedIn Insight Tag, and many more. You can also create custom HTML tags for any tracking code not covered by a built-in template. Each tag must have at least one trigger assigned to it — without a trigger, the tag will never fire.

Triggers tell GTM when to fire a tag. Common trigger types include Page View (fires on page load), Click (fires when a user clicks an element), Form Submission (fires when a form is submitted), Timer (fires after a specified duration), and Custom Event (fires when a custom event is pushed to the data layer). Triggers can include conditions to narrow when they fire — for example, a Page View trigger that only fires when the page URL contains “/thank-you.”

Variables store dynamic values that tags and triggers can reference. GTM includes built-in variables such as Page URL, Page Path, Click URL, Click Text, and Referrer. You can also create user-defined variables, such as Data Layer Variables (which read values from your website’s data layer), DOM Element Variables (which extract text or attributes from HTML elements), and Lookup Table Variables (which map input values to output values).

The data layer is a JavaScript object that acts as a bridge between your website and GTM. Your website pushes data into the data layer, and GTM reads it through Data Layer Variables. For example, after a purchase, your website might push an event called “purchase” along with the transaction value and product details. GTM can then use this data to fire conversion tags with accurate revenue information. Implementing a proper data layer is especially important for e-commerce businesses tracking purchases and product interactions.

Step 4: Create a GA4 Tag in GTM

One of the most common uses of GTM is to deploy Google Analytics 4 tracking. Rather than pasting the GA4 code directly into your website, you create a GA4 tag within GTM, which gives you more control and flexibility.

Create the GA4 Configuration Tag: In your GTM workspace, click “Tags” in the left navigation, then “New.” Name your tag “GA4 – Configuration” for clarity. Click the tag configuration area and select “Google Tag” from the list. In the Tag ID field, enter your GA4 Measurement ID (the “G-” code from your GA4 property). Under Triggering, select “All Pages” to ensure GA4 fires on every page of your website. Save the tag.

Create GA4 Event Tags: For custom event tracking, create additional tags using the “Google Analytics: GA4 Event” tag type. For example, to track button clicks, create a new tag, select “GA4 Event,” enter your Measurement ID or reference your configuration tag, and specify the event name such as “cta_button_click.” Under Event Parameters, you can add parameters like “button_text” using the Click Text variable and “page_location” using the Page URL variable. Set the trigger to fire on specific button clicks.

Track form submissions: Create a trigger of type “Form Submission.” Enable the option to “Wait for Tags” and “Check Validation” to ensure the trigger only fires when a form is actually submitted successfully. Add conditions such as Form ID equals “contact-form” to target specific forms. Then create a GA4 Event tag with the event name “form_submit” and attach this trigger. For detailed GA4 configuration, refer to our GA4 setup tutorial.

Track outbound link clicks: Create a trigger of type “Click – Just Links.” Enable the option “Wait for Tags.” Add the condition: Click URL does not contain “yourdomain.sg.” This captures clicks on links that lead away from your website. Create a GA4 Event tag with the event name “outbound_link_click” and add a parameter for the destination URL using the Click URL variable.

Step 5: Set Up Conversion Tracking Tags

Conversion tracking is critical for measuring the return on your advertising investment. GTM makes it straightforward to deploy conversion tracking tags for multiple platforms simultaneously.

Google Ads Conversion Tracking: In your Google Ads account, navigate to Tools and Settings, then Conversions. Create a new conversion action and select “Website.” Configure the conversion details — name, category, value, and count. Google Ads will provide a Conversion ID and Conversion Label. In GTM, create a new tag, select “Google Ads Conversion Tracking” as the tag type, and enter the Conversion ID and Conversion Label. Set the trigger to fire on your conversion page — typically a thank-you or order confirmation page.

Facebook Pixel: Many Singapore businesses advertise on Facebook and Instagram, making the Facebook Pixel essential for tracking conversions from Meta ads. In GTM, create a Custom HTML tag and paste your Facebook Pixel base code. Set it to fire on “All Pages.” For specific conversion events like purchases or leads, create additional Custom HTML tags with the corresponding Facebook Pixel event code (for example, fbq(‘track’, ‘Lead’)) and set appropriate triggers.

LinkedIn Insight Tag: For B2B companies in Singapore, LinkedIn advertising can be highly effective. GTM includes a built-in template for the LinkedIn Insight Tag. Create a new tag, search for “LinkedIn Insight” in the tag templates, enter your LinkedIn Partner ID, and set the trigger to “All Pages.” For conversion tracking, create additional LinkedIn event tags triggered on specific pages or actions.

Enhanced conversions: Google Ads now supports enhanced conversions, which improve conversion tracking accuracy by sending hashed first-party customer data alongside regular conversion tags. In GTM, edit your Google Ads Conversion Tracking tag, enable “Include user-provided data from your website,” and configure the data source — either automatic detection or manual specification using variables that capture email addresses or phone numbers from your forms.

Step 6: Debug and Publish Your Container

Before publishing any changes to your live website, you must thoroughly test them using GTM’s built-in debugging tools. Publishing untested tags can lead to broken tracking, inaccurate data, or even website performance issues.

Use Preview Mode: Click “Preview” in the top right corner of your GTM workspace. This opens the Tag Assistant interface and launches your website in a connected tab. As you navigate your website, the Tag Assistant shows which tags fired, which did not fire, what triggers were activated, and what data was available in the data layer. Click on any tag to see its configuration details and verify that it fired with the correct parameters.

Check the data layer: In the Tag Assistant panel, click on the “Data Layer” tab for any event to see what data was available at that point. This is invaluable for debugging issues with variables that pull from the data layer. Ensure that all the data your tags need is being pushed correctly by your website.

Test triggers carefully: Navigate through your website, clicking buttons, submitting forms, and performing the actions that should trigger your tags. Verify that each tag fires at the correct moment and does not fire when it should not. Pay special attention to form submission triggers — test with both valid and invalid form data to ensure the trigger respects form validation.

Verify in destination platforms: After confirming tags fire in GTM Preview Mode, verify that data arrives correctly in the destination platforms. Check GA4’s Realtime report for analytics events, Google Ads’ conversion tracking status, and Facebook Events Manager for Pixel events. This end-to-end verification ensures your entire tracking pipeline works.

Publish your container: Once you are satisfied that everything works correctly, click “Submit” in the top right corner. Add a version name (for example, “v1.0 – Initial GA4 and conversion setup”) and a description of the changes. Click “Publish.” Your tags are now live. GTM keeps a version history, so you can always roll back to a previous version if something goes wrong. This is one of GTM’s greatest advantages — the ability to undo changes quickly and safely.

Establish a workflow: For ongoing tag management, establish a clear workflow. Use GTM’s workspace feature to create separate workspaces for different team members or projects. Always test in Preview Mode before publishing. Document your tags with clear naming conventions — for example, prefix tags with the platform name like “GA4 – Page View” or “FB – Purchase Conversion.” Consistent naming makes it easier to manage a growing number of tags as your marketing efforts expand.

자주 묻는 질문

Does Google Tag Manager slow down my website?

GTM itself adds minimal overhead to your website — the container snippet is lightweight and loads asynchronously, meaning it does not block page rendering. However, the tags you deploy through GTM can affect page speed if you add too many or if individual tags are heavy. To minimise performance impact, only deploy tags you actively use, remove any obsolete tags, and use trigger conditions to ensure tags only fire when necessary. For Singapore businesses where page speed affects both user experience and SEO rankings, regularly auditing your GTM container is important.

Can I use Google Tag Manager with any website platform?

Yes, GTM works with virtually any website platform, including WordPress, Shopify, Wix, Squarespace, Magento, custom-built websites, and single-page applications. The installation method varies by platform, but the core functionality remains the same. Some platforms like Shopify have minor limitations with certain trigger types, but workarounds are available. GTM also supports mobile apps through dedicated iOS and Android containers.

What happens if I make a mistake in Google Tag Manager?

One of GTM’s best features is its version control system. Every time you publish changes, GTM creates a new version and keeps a complete history of all previous versions. If you publish a change that causes problems, you can immediately roll back to the previous version by going to Versions, selecting the last known good version, and clicking “Publish.” The rollback takes effect within minutes. Additionally, GTM’s Preview Mode allows you to test changes before publishing, significantly reducing the risk of errors reaching your live website.

How many tags can I add to Google Tag Manager?

There is no strict limit on the number of tags you can add to a GTM container. However, best practice recommends keeping your container lean and organised. Most Singapore SME websites typically have between 10 and 30 tags covering analytics, conversion tracking, remarketing, and third-party tools. Enterprise websites may have more. The key is to regularly review your container, remove tags that are no longer needed, and ensure every tag serves a clear purpose.

Do I still need a developer if I use Google Tag Manager?

For basic tag deployment — such as installing GA4, adding conversion tracking pixels, and tracking page views — GTM allows marketers to work independently without developer support. However, for advanced implementations like setting up a comprehensive data layer, tracking complex user interactions in single-page applications, or implementing server-side tagging, developer involvement is still beneficial. GTM reduces the frequency with which you need developer help, but it does not eliminate the need entirely for sophisticated tracking setups.

Is Google Tag Manager free?

Yes, Google Tag Manager is completely free for all users. There is no paid tier or usage limit for the standard web version. Google does offer Tag Manager 360 as part of the Google Marketing Platform for enterprise clients, which includes additional features such as approval workflows, service level agreements, and dedicated support. However, the free version is more than sufficient for the vast majority of Singapore businesses.