Magento 2 Google Tag Manager Extension - Webkul

02.11.2023 09:20 (zuletzt bearbeitet: 02.11.2023 09:32)
#1
avatar

Magento 2 GTM Extension allows you to quickly and easily update tags and code snippets on your e-commerce 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. Magento 2 GTM 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 edit 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 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:

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.

Remarketing Support
This allows you to show your website ads repeatedly to the customers who have visited your site and clicked on certain products. This helps you to get back your visitors again to your store.

The admin can implement Google Tag Manager Featured tags:

  • Google Analytics 4
  • 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 Magento 2 Google Tag Manager extension for ease of use of both in a single module. Using the Magento 2 Facebook pixel, the admin can send the data to Facebook for the various actions that the people take on your e-commerce store.

Magento 2 Google Tag Manager — 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 Magento 2 Google Tag Manager module configurations by the admin panel.

Google Ads Remarketing and Google Ads Conversion Tracking
The Google Ads Remarketing is a feature that allows the admin to create and manage the remarketing campaigns in Google ads through GTM.

Google Ads Conversion Tracking helps the admin to track the conversions and other metrics that are related to the Google Ads campaign through GTM. Admin can check the number of customers who visited the website through Google ads.

Installation- Google Tag Manager

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
Second Command — php bin/magento setup:di:compile
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.

Translation- Google Tag Manager
For translating the Magento 2 Google Tag Manager 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 Configuration
After the successful installation of this Magento 2 extension the admin will navigate to Stores > Configuration > Webkul > Google Tag Manager Configuration there you will find the General settings to configure the Google Tag Manager.

Configuration of GTM:
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.
GTM Account Id — The admin will connect automatically with Google Tag Manager.
Google Analytics Id — The admin will enter the Google Analytics Id here.
Google Analytics Measurement Id — The admin will enter the Google Analytics Measurement Id here.
Impression Chunk Size — It allows the admin to break up the payload into smaller chunks.
Product Identifier — It is a unique code that identifies a specific product and shared the data of the product to Google Analytics.
Enable Brand — It captures the brand information associated with the products on the website and shows it on Google Tag Assistant Data Layer.
Order Success Page Total Calculation — It calculates the total amount on the success page based on Subtotal or Grandtotal and reflects this on the Google Tag Assistant Data Layer.
Exclude Tax From Transaction — Add or remove the tax amount from the transaction by selecting Yes or No.
Exclude Shipping From Transaction — Add or remove the shipping cost from the transaction by selecting Yes or No.
Use Base Currency — It is an option in “Google Analytics” that determines whether the e-commerce data should be sent to Google Analytics in the base currency of the website or not.

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 the checkout 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, and Upsell Products.
Export GTM Container — From here the admin can export the container, which they have to import on their Google Analytics account.

Checkout Behaviour:
Add Carrier Title — It allows you to include the carrier name or shipping method that was used to deliver an e-commerce order in your Google Analytics tracking.
Add Payment Title — It allows you to include the payment method that was used for an e-commerce transaction in your Google Analytics tracking.

Configuration of Facebook Pixel:
To configure Facebook Pixel navigate through Stores->Configuration->Webkul->Facebook Pixel there you will find the General settings and can manage the events you wish to track.

Here, the admin will be able to configure the Magento 2 Google Tag Manager 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.

Configuration of Google Ads Conversion Tracking & Google Ads Remarketing
To configure Google Ads Conversion Tracking & Google Ads Remarketing navigate through Stores->Configuration->Webkul->Google Ads from there you can make the changes.

Google Ads Conversion Tracking
Here the admin can track the number of customers who visited the website through Google ads.

Enable — Enable or Disable Google Ads by selecting Yes or No.
Google Conversion Id — Enter your Google Conversion Id.

Google Ads Remarketing
It allows the admin to create and manage remarketing campaigns in Google Ads through GTM.

Enable — Enable or Disable Google Ads Remarketing by selecting Yes or No.
Conversion Code — Enter the Conversion Code.
Conversion Label — Enter the Conversion Label.
Exclude Orders with 0 Value — Enable exclude orders with 0 value by selecting Yes or No.

Note: Google Conversion ID and Conversion Code will be the same.

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.

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

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

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.

5th Step:
Now, for importing the container, click on Admin.

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.

7th Step:
To publish click the Submit button on the top right-hand side.

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

9th Step:
You will see the container is 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.

How to get the GTM Account Id?
After creating the GTM container ID, Now follow the mentioned steps for getting the Google Account ID:

Click on the container name:

Now go to Admin, and click on Account Settings:

From there only you will get the Account Id:

How to get Conversion Code and conversion Label?

For getting this you need to click here and then click on Sign in you will redirect towards the page as mentioned in the snap:

Then go to tools and settings, and click on conversions :

Next, Click on add conversion:

On the next page, click on the website:

Once clicking on the website, next enter the domain name:

Next, Click on Add a conversion action manually:

Enter all the relevant details, once entering all the details click on done:


Once clicking on done, Next, click on save continue>>Done.

Now go to the conversion which you have just created:

Now on the next page, click on Tag setup as mentioned in the snapshot will appear then go to Use Google Tag Manager

Here you will get the Google Conversion code and label:


How to get a Google Analytics ID?
In order to get a 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.

2nd Step:
Now click on Create Account, if not created.

3rd Step:
Give the account name and click on next.

4th Step:
Next, enter the Property Creation details:

5th Step:
Enter the business details like Industry Category and Business Size:

6th Step:
Now enter your business objectives, For reports that are personalized to your business,
select the topics most important to you.

7th Step:
Once clicking on next there will be a pop-up of terms & conditions, click on I agree, Next choose the data collection option as mentioned in the snapshot:

8th Step:
Once you choose your option, you have to now enter the Website URL and stream name:

9th Step:
Once entering the details you will be able to see the Google Analytics Id as mentioned in the snapshot:


Read more information here: https://webkul.com/blog/magento2-google-tag-manager/


 Antworten

 Beitrag melden
Bereits Mitglied?
Jetzt anmelden!
Mitglied werden?
Jetzt registrieren!