# Magento 1 Google Global Site Tag (gtag.js)

### <span style="color: #3b82f6;">Installation and User Guide for Magento 1 Google Global Site Tag (gtag.js)</span>

**Table of Contents**

1. [Installation ](#bkmrk-installation)
    - Disable Compilation Mode
    - Upload Package
    - Clear Caches
2. [Configuration Settings for Google Global Site Tag ](#bkmrk-configuration-settin)
    - General Settings
    - Admin Transactions Tracking
    - Backend Order Tracking in Google Analytics
    - Backend Order Tracking - Source/Medium
    - Google Analytics Checkout Behaviour
    - Google Analytics Shopping Behaviour
    - Google Analytics Sales Performance
3. [Front-end Site view ](#bkmrk-front-end-site-view)
    - Home Page with Tags
    - Gtag.js Code
    - Gtag.js Brand Name

### <span style="color: #3b82f6;">Installation</span> [](#bkmrk-)

- <span style="color: #f97316;">**Disable Compilation Mode:**</span> To check that this is disabled, go to **System &gt;Tools&gt; Compilation**. If the compiler status is 'Disabled', you are ready to go. If not, simply click the 'Disable' button on the right hand side of the screen.
- <span style="color: #f97316;">**Upload Package:**</span> Upload the content of the module to your root folder. This will not overwrite the existing Magento folder or files, only the new contents will be added.
- <span style="color: #f97316;">**Clear Caches:**</span> This can be done from the admin console by navigating to the cache management page (**System &gt; Cache Management**), selecting all caches, clicking 'refresh' from the drop-down menu, and submitting the change.

### <span style="color: #3b82f6;">Configuration Settings for Google Global Site Tag</span> [](#bkmrk--1)

Go to **Admin &gt; Stores &gt; Configuration &gt; Scommerce Configuration &gt; Google Global Site Tag**

#### <span style="color: #f97316;">General Settings</span> [](#bkmrk--2)

- **Enabled** - Select "Yes" or "No" to enable or disable the module.
- **License Key** - Please add the license for the extension which is provided in the order confirmation email. Please note license keys are site URL specific. If you require license keys for dev/staging sites then please email us at <support@scommerce-mage.com>.
- **Accounts Id** - You can add multiple account id. It can be analysis, adwords. 
    - **Main Account** - Select "Yes" to set your main analytics id as an account id. This account will be used to connect gtag.js.
    - **Use Linker** - If this is enabled (set to "Yes") then this account will be linked to domains from "Domains to link" field, which is specified below.
    - **Action** - You can delete your account.
- **Promotion Tracking** - Here is the format to set up the promotion tracking: `<a href='#' data-track-promo-id="PROMOID" data-track-promo-name="PROMONAME" data-track-promo-creative="PROMOCREATIVE" data-track-promo-position="PROMOPOSITION">Content</a>`
- **Brand Attribute** - Please select brand attribute, if you have one otherwise put your brand name in the below input box.
- **Brand Text Box** - Enter your brand name. Set brand name if there is no brand name with the product.
- **Enhanced Ecommerce Enabled** - Select "Yes" to enable this module. Please make sure this feature is enabled in Google Analytics first before enabling in Magento.
- **Send Base Data** - Set "Yes" if you want to send base order data and "No" to send store order data to Google.
- **Enable Google Optimize** - Select "Yes" to enable the module, or "No" to disable it.
- **Enable Linker** - If this is enabled then you can set linker properties, which is specified below e.g. Domain to link, Decorate Forms.
- **Dynamic Remarketing Enabled** - If set to "Yes" then this will enable and install remarketing tag to different pages.
- **Dynamic Remarketing other sites** - Set "Yes" to enable other site variables ([https://developers.google.com/adwords-remarketing-tag/parameters#other](https://developers.google.com/adwords-remarketing-tag/parameters#other)) instead of retail site variables.

[![image - 2025-07-02T155014.754.jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/scaled-1680-/image-2025-07-02t155014-754.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/image-2025-07-02t155014-754.jpg)

[![image - 2025-07-02T155108.212.jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/scaled-1680-/image-2025-07-02t155108-212.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/image-2025-07-02t155108-212.jpg)

#### <span style="color: #f97316;">Admin Transactions Tracking</span> [](#bkmrk--5)

- **Send Backend Transactions** - Set "Yes" if you want to send base order data and "No" to send store order data to Google created from admin panel.
- **Admin Source** - Please add the Campaign source for backend orders.
- **Admin Medium** - Please define the Campaign Medium for Backend Orders.

[![image - 2025-07-02T155143.127.jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/scaled-1680-/image-2025-07-02t155143-127.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/image-2025-07-02t155143-127.jpg)

- <span style="color: #f97316;">**Backend Order Tracking in Google Analytics**</span> - You can track admin orders by selecting "Yes" for **"Admin Transactions Tracking"** from **Admin &gt; Stores &gt; Configuration &gt; Scommerce Configuration &gt; Global Site Tag (gtag.js) &gt; Admin Transactions Tracking - "Yes"**. In the below Image you can see the tracked admin orders in Google Analytics.

[![image - 2025-07-02T155229.609.jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/scaled-1680-/image-2025-07-02t155229-609.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/image-2025-07-02t155229-609.jpg)

- <span style="color: #f97316;">**Backend Order Tracking - Source/Medium**</span> - To add campaign Source and Medium for backend orders go to **Admin &gt; Stores &gt; Configuration &gt; Scommerce Configuration &gt; Global Site Tag (gtag.js) &gt; Admin Transactions Tracking - "phone" &gt; Admin Medium - "admin"**.

[![image - 2025-07-02T155335.159.jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/scaled-1680-/image-2025-07-02t155335-159.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/image-2025-07-02t155335-159.jpg)

- <span style="color: #f97316;">**Google Analytics Checkout Behaviour**</span> - You can view the checkout behaviour in GA tool under **Conversions &gt; Ecommerce &gt; Checkout Behaviour**.

[![image - 2025-07-02T155415.649.jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/scaled-1680-/image-2025-07-02t155415-649.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/image-2025-07-02t155415-649.jpg)

- <span style="color: #f97316;">**Google Analytics Shopping Behaviour**</span> - You can view the shopping behaviour with all sessions, product views, add to cart and checkout details in GA tool under **Conversions &gt; Ecommerce &gt; Shopping Behaviour**.

[![image - 2025-07-02T155604.801.jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/scaled-1680-/image-2025-07-02t155604-801.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/image-2025-07-02t155604-801.jpg)

- <span style="color: #f97316;">**Google Analytics Sales Performance**</span> - You can view the shopping behaviour with all sessions, product views, add to cart and checkout details in GA tool under **Conversions &gt; Ecommerce &gt; Sales Performance**.

[![image - 2025-07-02T155723.488.jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/scaled-1680-/image-2025-07-02t155723-488.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/image-2025-07-02t155723-488.jpg)

### <span style="color: #3b82f6;">Front-end Site view</span> [](#bkmrk--12)

- <span style="color: #f97316;">**Home Page with Tags**</span> - In Tag Assistant tool you can see all the fired tags.

[![image - 2025-07-02T155802.447.jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/scaled-1680-/image-2025-07-02t155802-447.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/image-2025-07-02t155802-447.jpg)

- <span style="color: #f97316;">**Gtag.js Code**</span> - You can see the **UA** and **AW** tracking id's added from **Admin &gt; Stores &gt; Configuration &gt; Scommerce Configuration &gt; Global Site Tag (gtag.js) &gt; Account Id &gt; Click on "Add Account"** - UA - 33387561-3, AW - 123456789.

[![image - 2025-07-02T155847.885.jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/scaled-1680-/image-2025-07-02t155847-885.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/image-2025-07-02t155847-885.jpg)

- <span style="color: #f97316;">**Gtag.js Brand Name**</span> - You can add brand name from **Admin &gt; Stores &gt; Configuration &gt; Scommerce Configuration &gt; Global Site Tag (gtag.js) &gt; Brand name - "TestScommerce"**

**[![image - 2025-07-02T160008.999.jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/scaled-1680-/image-2025-07-02t160008-999.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-07/image-2025-07-02t160008-999.jpg)**

If you have a question related to this extension please check out our [**FAQ Section**](https://www.scommerce-mage.com/magento-facebook-conversion-audience-tracking.html#faq) first. If you can't find the answer you are looking for then please contact [**support@scommerce-mage.com**](mailto:core@scommerce-mage.com)**.**