Menu Close
    Convert your store into Magento 2 Multi Vendor Marketplace

    Magento 2 Google Tag Manager

    What is Google Tag Manager?

    Google Tag Manager allows you to quickly and easily update tags and code snippets on your website that are intended for traffic analysis and marketing optimization.

    Hence this tag managing system can also be said as a code management platform that fires all of your other tags according to the triggers that you will specify in the Google Tag Manager interface. It can also handle third-party tags with ease. After the container snippet is deployed on your website no technical help is necessary to deploy new tags or editing the existing tags.

    How does the Google Tag Manager work?

    You just need to place a small snippet of code on your website. This snippet of code connects your app to the tag manager servers. You can now make use of the web-based user interface to install the tracking codes on your website, like – the Google Analytics tags.

    Now, you can configure triggers to fire when an event occurs. An event can be something like – a page load, a tap on a screen, or a form submission. It’s all done through the Tag Manager’s web interface. When a user interacts with your content, triggers will be evaluated based on the events that you have specified, and the tags will fire accordingly.

    Advantages of using the Google Tag Manager:

    1. Improves your website performance
      Google Analytics and Adwords surely slow down your website speed after you have put the codes on the source website. Google Tag Manager allows third-party to handle all your script-tags and you only need to add its code to your website.
    2. Remarketing Support
      This allows you to show your website ads repeatedly to the customers who have visited your site and clicked on your certain products. This helps you to get back your visitors again to your store.

    The admin can implement Google Tag Manager Featured tags:

    • Universal Analytics
    • Google Ads Conversion Tracking
    • Google Ads Re-marketing
    • Floodlight Counter
    • Floodlight Sales
    • Conversion Linker
    • Google Optimize
    • Google Surveys Website Satisfaction

    Also, you can implement some more tags such as:

    • AB TASTY Generic Tag
    • Adometry
    • AdRoll Smart Pixel
    • Audience Center 360
    • AWIN Conversion
    • AWIN Journey
    • Bizrate Insights Buyer Survey Solution
    • Bizrate Insights Site Abandonment Survey Solution
    • ClickTale Standard Tracking
    • comScore Unified Digital Measurement
    • Crazy Egg
    • Criteo OneTag
    • DistroScale Tag
    • Dstillery Universal Pixel
    • Eulerian Analytics
    • Google Trusted Stores
    • Hotjar Tracking Code
    • Infinity Call Tracking Tag
    • Intent Media – Search Compare Ads
    • K50 tracking tag
    • LeadLab
    • LinkedIn Insight
    • Lytics JS Tag
    • Marin Software
    • Mediaplex – IFRAME MCT Tag
    • Mediaplex – Standard IMG ROI Tag
    • Bing Ads Universal Event Tracking
    • Mouseflow
    • AdAdvisor
    • DCR Static Lite
    • Nudge Content Analytics
    • Oktopost Tracking Code
    • Optimise Conversion Tag
    • Message Mate
    • Perfect Audience Pixel
    • Personali Canvas
    • Placed
    • Pulse Insights Voice of Customer Platform
    • Quantcast Measure
    • SaleCycle JavaScript Tag
    • SaleCycle Pixel Tag
    • SearchForce JavaScript Tracking for Conversion Page
    • SearchForce JavaScript Tracking for Landing Page
    • Shareaholic
    • SearchForce Redirection Tracking
    • Survicate Widget
    • Tradedoubler Lead Conversion
    • Tradedoubler Sale Conversion
    • Turn Conversion Tracking
    • Turn Data Collection
    • Twitter Universal Website Tag
    • Upsellit Confirmation Tag
    • Upsellit Global Footer Tag
    • Ve Interactive JavaScript
    • Ve Interactive Pixel
    • VisualDNA Conversion Tag
    • Xtremepush – Web Push & Onsite Engagement
    • Yieldify

    Facebook Pixel

    The Facebook pixel is one analytics tool that lets you check how effective your advertisements are by letting you understand the actions that people take on your website.

    The Facebook pixel has been merged with the Google Tag Manager extension for ease of use of both in a single module. Using the Facebook pixel, the admin can send the the data to Facebook for the various actions that the people take on your e-commerce store.

    Features

    • Easily configure Google Tag Manager in your Magento 2 webstore.
    • Takes less time to configure scripts within your store.
    • Track and check Analytics on Google.
    • Integrate Facebook Pixel to your website.
    • Can add multiple Facebook Pixel IDs as per multiple store views.
    • Track standard events like Product View, Category View, Add to Cart, Add to Wishlist, Initiate Checkout, Purchase, Product Search, and Customer Registration.
    • Each event can be enabled or disabled separately.
    • Can create the custom audience and reach them via targeted Facebook ads.
    • Can also target your audience via dynamic Ads. But for dynamic ads, you need to have your product catalog on Facebook as well.
    • Easy access to manage the module configurations by the admin panel.

    Installation- Google Tag Manager

    GTM Module Installation

    Customers will get a zip folder and they have to extract the contents of this zip folder on their system. The extracted folder has an src folder, inside the src folder you have the app folder. You need to transfer this app folder into the Magento 2 root directory on the server as shown below in the snapshot.

    After the successful installation, you have to run these commands in the Magento2 root directory.

    First command- php bin/magento setup:upgrade

    Run Command -1
    Run Command - 2

    Second Command – php bin/magento setup:di:compile

    Run Command - 3

    Third Command – php bin/magento setup:static-content:deploy

    After running the commands, you have to flush the cache from Magento admin panel by navigating through->System->Cache management as shown below.

    Flush Cache

    Translation- Google Tag Manager

    For translating the module language, please go to app>code>Webkul>GoogleTagManager>i18n and edit the en_US.csv file. Now, translate the words on the right and upload the modified file to the same location. The filename of the translated file should be according to the language and region code in which you want to translate like de_DE.csv.

    Module Translation

    Module Configuration

    After the successful installation of the extension the admin will navigate to Stores > Configuration > Webkul > Google Tag Manager Configuration to configure the Google Tag Manager.

    Configuration of GTM:

    webkul-magento2-google-tag-manager-configuration-1-3

    General Settings:

    Enable – Enable the extension by selecting a Yes which brings up a section to enter the Container ID. Selecting a No will disable the extension.

    Container Id – Here the admin will enter the Container ID to update some information on an event.

    Google Analytics Id – The admin will enter the Google Analytics Id here.

    Enhance E-commerce:

    Under Enhance E-commerce, the admin can enable or disable the various option on their website to get that measure by GTM such as

    • Measure Purchase – It helps you to measure the purchase rate on your website.
    • Measure Checkout – It helps to measure how many people have reached to the check-out page.
    • Add to Cart Measure – It helps to measure the add to cart product rate.
    • Measure Remove from Cart – It helps to measure the rate of products which are removed from the cart.
    • Product Details Measure – It helps to measure the activity on the product detail page.
    • Measure Product Impressions from – The admin can select the available options from which they want to measure the product information. Available options are Category, Wishlist, Compare, Search, Advance search, Related Products, Upsell Products.

    Export GTM Container – From here the admin can export the container, which they have to import on their Google Analytics account.

    Configuration Facebook Pixel:

    To configure Facebook pixel navigate through Stores->Configuration->Webkul->Facebook Pixel.

    Facebook Pixel Configuration Settings

    Here, the admin will be able to configure the General Settings and Manage the Events that the admin wants to track

    General Settings

    Here, the admin will –

    • Enable FB Pixel – Select Yes to enable else set it as No to keep disabled.
    • Enter Facebook Pixel ID – Enter the Facebook pixel ID.

    Manage Events you Want to Track

    Here, the admin will be able to manage various events that can be tracked. Each of these events can be enabled or disabled for use by the admin.

    • Product View – Tracks the event when someone visits the product page of the web store.
    • Category View – Tracks the event when someone visits the category page of the web store.
    • Add to Cart – Tracks the event when someone clicks on the add to cart button.
    • Add to Wishlist – Tracks the event when someone adds a product to his wishlist.
    • Initiate Checkout – Track the event when someone initiates a checkout on the web store.
    • Purchase – Track the event when someone purchases a product from the webstore.
    • Product Search – Track the event when someone searches for something using the search feature.
    • Customer Registration – Track the event when someone registers on the web store.

    How to get GTM Container ID?

    To get the Container Id you must first create an account at Google Tag Manager (Signup is free), for that, you can click here. Now, after going to this link follow the below steps-

    1st Step:

    Enter the account name(as per your requirement) and then click Continue.

    Set-Up-Container-ID_Google Tag Manager

    2nd Step:

    Now set up the Container name(as per your requirement), select where to use the container and then click Create.

    Set-Up-Container-ID-2_Google Tag Manager

    3rd Step:

    Now on the pop-up, click Yes to confirm to the Google Tag Manager Terms of Service.

    Set-Up-Container-ID-3

    4th Step:

    Now the screen that appears, here you will see the container Id on the top menu bar. This container ID is to be put in the admin back-end configuration of the extension.

    google-tag-manager

    5th Step:

    Now, for importing the container, click on Admin.

    Import-Tag_Google Tag Manager

    6th Step:

    Now, click on import container and choose container file, that has downloaded from Google Tag Manager configuration. Also, choose the workspace as New and import option as Overwrite.

    Import-container

    7th Step:

    To publish click the Submit button on the top right-hand side.

    google-tag-manager-1

    8th Step:

    A Sliding section comes up, here select Publish and Create version, enter version name, description and hit the Publish button.

    submit changes

    9th Step:

    You will see the container is published.

    container published

    10th Step:

    Lastly, click on the Tag Manager icon on the top left-hand corner or go to All Accounts. Here, you will see the Container ID.

    container id visible

    How to get Google Analytics Id?

    In order to get Google Analytics Id you must need to Sign in to your Analytics account, after that follow the following steps:

    1st Step:

    Now, click on Admin.

    Navigate-Admin

    2nd Step:

    Now click on Create Account, if not created.

    Create-Account

    3rd Step:

    Give the account name and click on next.

    Analytics

    4th Step:

    On next step, select web or Apps for which you want to measure.

    Measure-web-or-apps

    5th Step:

    Now, under Property setup enter the property details such as website Name, URL, Industry Category, Time Zone. After that, click on Create button.

    Property-setup

    6th Step:

    Once created, now go to property click Tracking Info > Tracking Code.

    Your Tracking ID is displayed at the top of the page.

    Analytics-ID

    How to do E-Commerce Set Up?

    1st Step:

    Log in to Analytics.google.com, and click on Admin button.

    Ecommercer-setup-settings2-3

    2nd Step:

    After that, click on Ecommerce Settings under All Web Site Data.

    Ecommercer-setup-settings1

    3rd Step:

    Under Ecommerce set-up, enable Ecommerce and Enable Enhanced Ecommerce Reporting.

    Ecommercer-setup-settings

    4th Step:

    Now, click on Save button.

    Analytics-1

    How to get the Facebook Pixel ID?

    To use this module, you first need to create a Facebook Pixel in your Facebook Business Manager. For this, click on the link – https://www.facebook.com/ads/manager/pixel

    Webkul-magento2-FbPixel-Fb-login

    After login, you get navigated to the Facebook Event Manager account of your Facebook.

    Note: Click on Login if you already have a Facebook account. Else click on Sign up to create the facebook account first.

    Now, you need to goto Business Settings under Event Manager as per below image:

    webkul-magento2-Fbpixel-business-setting

    After that, you need to select Pixels under Data Sources and can add new pixel by clicking on Add, as per below image:

    webkul-magento2-Fbpixel-data-source

    Here, after clicking on “Add”, you will get a pop when you will click on the Create button.

    Webkul-magento2-FbPixel

    After clicking on the Create button you will get a success message as per the below image.

    Webkul-magento2-FbPixel-create-fb-pixel

    After this, you will get the Facebook Pixel ID.

    Webkul-magento2-FbPixel

    Thus, in this way the admin will get the Facebook pixel Id.

    How to validate GTM Extension is Installed Correctly?

    To check if the Google Tag Manager is properly installed, the data on your website should get displayed as shown below in the snapshots.

    Note: To check this, you must have installed the Google Chrome browser extension – Tag Assistant(By Google).

    Some Examples

    Category Page: On the category page, the data layer shows the product details on the category page.

    Product Page_Google Tag Manager

    Product Page: On the product page, the data layer shows the current product details.

    Screenshot_from_2020_07_15_16_04_27-1_Google Tag Manager

    Cart-Page/Add to Cart: Here, the data layer shows the checkout cart data and the cart data.

    Order Success Page_Google Tag Manager

    All the data go into the analytics, from there the admin can analyse the action on the website.

    Analysis of the Website

    E-commerce Overview

    It shows the result in a graph from, including the E-commerce conversion rate, Revenue, Transactions, Average Order value.

    Ecoomerce-overview_Google Tag Manager

    Shopping Behaviour

    It helps the admin to analyse the behaviour of shopping of the users on their website.

    It shows how many customers perform no shopping activity, no cart addition. Also, how many customers Abandoned the cart and Abandoned the check-out process.

    shopping-behaviour_Google Tag Manager

    Checkout Behaviour

    It helps the analyse the sessions, checkout progression, and Abandonments.

    checkout-behaviour-1_Google Tag Manager

    Product Performance

    The admin can also analyse the product performance.

    product-performance_Google Tag Manager

    Sales Performance

    The admin can also view the sale performance that shown analytics based on quantity, refund amount, revenue, shipping and tax.

    sales-performance-analysis

    Product List Performance

    This analytics will show you how clusters of products are performing on your website.

    product-list-performance

    Facebook Pixel – Workflow Front-end

    Once you have configured the module settings, log in to your Facebook Business Manager account.

    In the Data Sources section, select the Overview tab as shown below.

    The admin can view Events and can view details of the Event by selecting “View Details“.

    Webkul-magento2-FbPixel-overview_Google Tag Manager

    On selecting View Details, a pop box will appear as shown below:

    Webkul-magento2-FbPixel-data-source Google Tag Manager

    Here, the admin can track the information for all the dynamic events of the Magento store convenietly.

    Verify Events

    The admin can even verify individual pages and make sure that the events are installed correctly. For this, the admin needs to install the Facebook Pixel Helper as a chrome extension. This is optional.

    Facebook Pixel Helper At Work


    Facebook Pixel Helper is a tool that checks the accuracy of the Facebook Pixel and tests that the pixel is working fine.

    Note – (Facebook Pixel will not work if any ad-blocker is enabled in your browser.)

    That’s all for the Magento 2 Google Tag Manager extension. Still, have any issue feel free to add a ticket and let us know your views to make the module better webkul.uvdesk.com

    Current Product Version - 4.0.0

    Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x

    . . .
    Discuss on Helpdesk

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    4 comments

  • manish
    hello webkul,

    greetings

    I have a multivendor marketplace store, and the marketplace extension id of some other vendor.

    1. Can I install this and will it be compatible.
    2. I have a facility where customer can search a vendor. Can I get data from those pages also.

    • Nishad Bhan (Moderator)
      Hello Manish,

      The extension works with the default Magento 2 store and for this extension to work correctly it has no dependency on any of the extensions installed within a website. So, you can install this extension and it will work just fine.

      Also, as you said “I have a facility where customer can search a vendor. Can I get data from those pages also.” For the extension to work for this will require customization(A Paid Service) as the extension only works for the default Magento 2 pages.

      For any further query on this kindly revert back to us at [email protected]

  • Shaba
    Is it possible to add facebook pixel using this tag manager extension?
    • Hari Narayan Bairwa (Moderator)
      For Facebook pixel, we are having a separate module you can check it – https://store.webkul.com/Magento2-Facebook-Pixel.html
      Using Magento 2 Facebook Pixel module you can integrate this analytics tool to your Magento store. This will allow the store owner to track visitors and their behavior on your website.
  • Back to Top