Installation
You will require to install MageDelight Base Extension first. If it is not installed then please download it from https://www.magedelight.com/pub/extensions/magedelight-base.zip and unzip the package file into the root folder of your Magento 2 installation.
Before installing the extension, please make sure to Backup your web directory and store database
You will require to install MageDelight Base Extension first. If it is not installed then please download it from https://www.magedelight.com/pub/extensions/magedelight-base.zip and unzip the package file into the root folder of your Magento 2 installation.
Root Directory is - "app/code/magedelight/#YourExtensionName#"
- Unzip the extension package file into the root folder of your Magento 2 installation.
- Connect to SSH console of your server:
- Navigate to the root folder of your Magento 2 setup
Run command as per below sequence,
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento cache:clean
- log out from the backend and log in again
If you are using Magento 2.3 or later then you do not need to activate license. Extension will be activated with silent activation mechanism and does not require activation keys to be entered manually.
Backend Configuration (Admin side)
- Enable: Set "Yes" to enable the GA4 with GTM module.
- Associated Google Account: Enter your Google email to identify the associated GA4 account.
- GA4 API Keys: Enter the AI key that you generated from the Google Analytics 4 Panel
- Cookie Consent Based Tracking: Enable/disable GA4 tracking for customers.
- Strict Domain Tracking: Option to enable/disable strict domain tracking.
- Domain: You can add the domain name for the Ga4 tracking.
- GTM JavaScript Head Code: Provide GTM JavaScript Code here with your unique GTM tracking ID.
- GTM Non-JS Body Code: Provide GTM Non-Javascript Code here with your unique GTM tracking ID.
- Account ID: Provide the Google Tag Manager (GTM) Account ID associated with your setup.
- Container ID: Provide the GTM Container ID for the specific container you wish to use.
- Measurement ID: Provide the Google Analytics 4 (GA4) Measurement ID to link your data stream.
- Export Triggers and Tags: Click on "Generate" button to get the JSON file for the GTM.
- Promotion Tracking: Set to "Yes" to enable promotion tracking in GA4.
- Event List: Select the event from the provided list that you wish to track for the promotional event.
Product Identifier: Select either SKU or ID to share with Google Analytics:
- SKU: Shares the Magento Product SKU.
- ID: Shares the Magento Product ID.
Currency: Choose between Base Currency or Store Currency for GA4:
- Base Currency: Shares the store's base currency (e.g., USD).
- Store Currency: Shares the store's local currency (e.g., GBP).
- For multi-currency setups, select based on your GA4 panel configuration.
Enable Brand: Select "Yes" to enable brand tracking, which shares brand values with GA4 APIs.
Brand Attribute: Specify the Magento attribute (e.g., "brand") to be used for sharing brand values with Google Analytics.
Enable Product Variant: Select "Yes" to enable sharing of product variant information (e.g., size, color) with GA4 APIs.
Child vs Parent:
- If Child is selected, GA4 APIs will receive Child Product information.
- If Parent is selected, only Parent Product information will be shared.
- This is useful for tracking configurable products (e.g., Parent SKU "MT11" shares "MT11," while Child SKU "MT11-S-Blue" shares "MT11-S-Blue"
Checkout Success Page Path: Specify the URL path for the checkout success page to track successful transactions.
Order Total Calculation: Select the appropriate option from the dropdown list:
- Subtotal: Includes only the subtotal of the order.
- Grand Total: Includes the subtotal, taxes, and shipping costs for the entire order.
Exclude Tax From Transaction: Select "Yes" to exclude tax from the transaction total when sending data to GA4.
Exclude Shipping From Transaction: Select "Yes" to exclude shipping costs from the transaction total when sending data to GA4.
- Account ID: Provide GTM Account ID.
- Checkout Success Path: Please provide webpage URL of checkout success. I.e., "checkout/onepage/success".
- Provide "Public ID" (it can be found in your GTM account) to generate tags, triggers, and variables for GA4. It will be helpful to import the same to Google Analytics Panel.
Backend Functionality
Realtime Tracking Logs
MageDelight >> GA4 with GTM >> Reports >> Realtime Tracking Logs
- Realtime Data in JSON format can be viewed in the admin panel.
Purchase
Click here to purchase from MageDelight.
Click here to purchase from Magento Marketplace. (Composer installation supported)
Thank you for choosing MageDelight!