---
title: How to install Google Tag Manager container for the Magento 2 website
description: Configure your Magento 2 store with Google Tag Manager
---

[Skip to content](https://kb.feedops.com/knowledge/installing-google-tag-manager-container-scripts-for-magento-2#main-content)

English

Show submenu for translations

[![Feedops-logo\_Final-2-4 1](https://kb.feedops.com/hs-fs/hubfs/Feedops-logo_Final-2-4%201.png?width=150&height=55&name=Feedops-logo_Final-2-4%201.png)](https://kb.feedops.com/knowledge?hsLang=en)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [Contact Us](https://feedops.com/contact-us/)

[Contact Us](https://feedops.com/contact-us/)

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Help Center](https://kb.feedops.com/knowledge?hsLang=en)
2. [Website Integration Help](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en)
3. [Magento 2.X](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en#magento-2-x)

# How to install Google Tag Manager container for the Magento 2 website

## Configure your Magento 2 store with Google Tag Manager

Before you install the Google Tag Manager container, you will require your container scripts. If you don't have a Google Tag Manager container, check our [How to create a new Google Tag Manager container](https://kb.feedops.com/knowledge/creating-a-new-google-tag-manager-container?hsLang=en) guide. If you already have a Google Tag Manager container, check our [Where to find Google Tag Manager container scripts](https://kb.feedops.com/knowledge/finding-google-tag-manager-container-scripts?hsLang=en) guide.

Once you have your Google Tag Manager container scripts:![Install GTM Container Scripts](https://kb.feedops.com/hs-fs/hubfs/Install%20GTM%20Container%20Scripts.png?width=688&name=Install%20GTM%20Container%20Scripts.png)

The best way to install and ensure the Google Tag Manager container is configured to trigger on each website page accurately is by adding the scripts directly to the default store view.

1. Log in to your Magento 2 admin panel.
2. In the left-hand menu, go to **Admin Panel \> Content \> Configuration**.![Configuration - Magento](https://kb.feedops.com/hs-fs/hubfs/Configuration%20-%20Magento.jpg?width=688&name=Configuration%20-%20Magento.jpg)
3. Choose the **Store View** you want to paste the Google Tag Manager container scripts to OR select **Global** to add it on every Store View and click **Edit**.![Store View - Magento](https://kb.feedops.com/hs-fs/hubfs/Store%20View%20-%20Magento.jpg?width=688&name=Store%20View%20-%20Magento.jpg)
4. Go to the **HTML Head \> Scripts & Style Sheets** section and paste the Google Tag Manager **\<head\>** script as the last tag.![Add MC Tag - Magento](https://kb.feedops.com/hs-fs/hubfs/Add%20MC%20Tag%20-%20Magento.jpg?width=688&name=Add%20MC%20Tag%20-%20Magento.jpg)
5. Go to the **Footer \> Miscellaneous HTML** section and paste the Google Tag Manager **\<body\>** script as the first tag.![Body GTM Script - Magento](https://kb.feedops.com/hs-fs/hubfs/Body%20GTM%20Script%20-%20Magento.png?width=688&name=Body%20GTM%20Script%20-%20Magento.png)
6. After pasting the scripts, don't forget to click **Save Configuration**.![Save Configuration - Magento](https://kb.feedops.com/hs-fs/hubfs/Save%20Configuration%20-%20Magento.jpg?width=688&name=Save%20Configuration%20-%20Magento.jpg)
7. Now you want to **Clear Magento 2 Cache**. Go to **Admin Panel \> System \> Cache Management**.![Cache Management - Magento](https://kb.feedops.com/hs-fs/hubfs/Cache%20Management%20-%20Magento.jpg?width=688&name=Cache%20Management%20-%20Magento.jpg)
8. Click Flush Magento Cache. Once the cache has been flushed you will see the success message.![Flush Cache - Magento](https://kb.feedops.com/hs-fs/hubfs/Flush%20Cache%20-%20Magento.jpg?width=688&name=Flush%20Cache%20-%20Magento.jpg)

For more information, please visit - [Add GTM Code to your Adobe Commerce Store](https://docs.magento.com/user-guide/marketing/google-tag-manager.html#step-4-add-the-gtm-code-to-your-adobe-commerce-store)

You have now successfully installed your Google Tag Manager container on your website. To implement Conversion Tracking & Dynamic Remarketing, check our [Conversion Tracking and Dynamic Remarketing Tag instructions for Magento 2.X](https://kb.feedops.com/knowledge/conversion-tracking-and-dynamic-remarketing-tag-instructions-for-magento-2?hsLang=en) guide.

- [FeedOps Toolkit](https://kb.feedops.com/knowledge/feedops-toolkit?hsLang=en#main-content)

    - [Feed Optimization](https://kb.feedops.com/knowledge/feedops-toolkit?hsLang=en#feed-optimization)
    - [Insights](https://kb.feedops.com/knowledge/feedops-toolkit?hsLang=en#insights)
- [Onboarding FeedOps](https://kb.feedops.com/knowledge/onboarding-feedops?hsLang=en#main-content)

    - [Initial Set-Up](https://kb.feedops.com/knowledge/onboarding-feedops?hsLang=en#initial-set-up)
    - [Account & Website Settings](https://kb.feedops.com/knowledge/onboarding-feedops?hsLang=en#account-website-settings)
    - [Supported Platform Guides](https://kb.feedops.com/knowledge/onboarding-feedops?hsLang=en#supported-platform-guides)
- [Troubleshooting](https://kb.feedops.com/knowledge/troubleshooting?hsLang=en)
- [Choosing FeedOps](https://kb.feedops.com/knowledge/choosing-feedops?hsLang=en#main-content)

    - [FeedOps Overview](https://kb.feedops.com/knowledge/choosing-feedops?hsLang=en#feedops-overview)
    - [Help Center Introduction](https://kb.feedops.com/knowledge/choosing-feedops?hsLang=en#help-center-introduction)
- [Using FeedOps](https://kb.feedops.com/knowledge/using-feedops?hsLang=en#main-content)

    - [Google Free Product Listings](https://kb.feedops.com/knowledge/using-feedops?hsLang=en#google-free-product-listings)
    - [FeedOps Optimizations](https://kb.feedops.com/knowledge/using-feedops?hsLang=en#feedops-optimizations)
    - [Google Ads](https://kb.feedops.com/knowledge/using-feedops?hsLang=en#google-ads)
    - [eCommerce Store Connection](https://kb.feedops.com/knowledge/using-feedops?hsLang=en#ecommerce-store-connection)
    - [Google Analytics](https://kb.feedops.com/knowledge/using-feedops?hsLang=en#google-analytics)
    - [Google Merchant Center](https://kb.feedops.com/knowledge/using-feedops?hsLang=en#google-merchant-center)
    - [Facebook Catalog](https://kb.feedops.com/knowledge/using-feedops?hsLang=en#facebook-catalog)
    - [Microsoft Ads](https://kb.feedops.com/knowledge/using-feedops?hsLang=en#microsoft-ads)
- [Website Integration Help](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en#main-content)

    - [BigCommerce](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en#bigcommerce)
    - [Google Analytics](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en#google-analytics)
    - [Magento](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en#magento)
    - [Ecwid](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en#ecwid)
    - [Shopify](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en#shopify)
    - [Magento 2.X](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en#magento-2-x)
    - [Neto](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en#neto)
    - [OpenCart](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en#opencart)
    - [Other](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en#other)
    - [Google Merchant Center](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en#google-merchant-center)
    - [WooCommerce](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en#woocommerce)
    - [Salesforce Commerce Cloud](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en#salesforce-commerce-cloud)
    - [Marketplacer](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en#marketplacer)
    - [Tracking Conversions and Remarketing Events](https://kb.feedops.com/knowledge/website-integration-help?hsLang=en#tracking-conversions-and-remarketing-events)
- [Learning Center](https://kb.feedops.com/knowledge/learning-center?hsLang=en#main-content)

    - [Google Ads](https://kb.feedops.com/knowledge/learning-center?hsLang=en#google-ads)
    - [Google Merchant Center](https://kb.feedops.com/knowledge/learning-center?hsLang=en#google-merchant-center)
- [Muzaara Bing Shopping Feed](https://kb.feedops.com/knowledge/muzaara-bing-shopping-feed?hsLang=en#main-content)

    - [Platform](https://kb.feedops.com/knowledge/muzaara-bing-shopping-feed?hsLang=en#platform)

[![FeedOps ](https://kb.feedops.com/hs-fs/hubfs/60a5a09c9ca6b7064e3fac09_feedops-footer-logo.png?width=322&height=87&name=60a5a09c9ca6b7064e3fac09_feedops-footer-logo.png "FeedOps ")](http://feedops.com)

Copyright © 2026, FeedOps