Google Tag Manager Custom Module for Magento
TABLE OF CONTENTS Table of Contents Table Of Contents...2 1. INTRODUCTION...3 2. Overview...3 3. Requirements...3 4. Features...4 4.1 Features accessible from Front End...4 4.2 Features accessible from Back End...4 5. Installation...4 5.1 Manual Installation...4 6. Configuration...5 6.1 Admin Configuration...5 6.2 Frontend Functionalities...7 7. Technical Information...8 8. Un-installation...9 9. Unsupported Features & Known Issues...9 10. Troubleshooting...9
1. Introduction This document is intended as a technical resource for the installation, setup and use of the Google Tag Manager Custom module for Magento. The extension is Plug& Play and compatible with Magento Enterprise version 1.11, 1.12 and 1.13 2. Overview Magento is an open source e-commerce CMS that uses a LAMP (Linux, Apache, MySQL, PHP) architecture. As an open source platform, the modifications one could make to their website are limitless. With this in mind the integration was developed to incorporate as close to core Magento API functionality as possible. This module will automatically include the Google Tag Manager Container snippet i.e. the JavaScript code in all your website source code pages immediately after the body start tag. It also provides support for Data layer. The data layer carries the Visitor Information and Transaction details if enabled. It also contains an Order Analytics module that pulls information like Visitor Information, Sessions Tracking, and Traffic Sources and displays this information in admin 3. Requirements 1. Magento Enterprise Edition v1.11 and Above 2. Magento Google Tag Manager Module 3. Magento Administrative Privileges.
4. Features This is a Third Party Module to integrate with Magento; here is the list of features: 4.1 Features accessible from Front End 1. Automatic script inclusion in all pages 2. Support for Data layer 4.2 Features accessible from Back End 1. Enable/Disable Data layer Ecommerce Transactions 2. Enable/Disable Order Analytics module 3. Choose your Data Layer name 5. Installation 5.1 Manual Installation 1. Obtain a copy of the Google Tag Manager Module 2. Unzip the Module files into a local directory. 3. Move all files into their respective directories in your Magento installation directory on the FTP server as they appear after unzipping the package. 4. Clear your store cache. 5. In your Magento admin panel, this is under System > Cache Management. 6. Log Out of your Magento Admin and then log back in. 7. This refreshes the Magento ACL date which effects your administrative permissions. You will not see expected module behavior until you do this. You may also need to refresh your cache. 8. After all copying is complete browse to your Magento homepage in order to complete the module install 9. You should now have a Google Tag Manager section in your Admin Panel under System>Configurations> Google Tag Manager Further details are given in the configuration section
6. Configuration 6.1 Admin Configuration Login to admin panel and navigate to Zeon Extensions ->Google Tag Manager -> Google Tag Manager Settings
Google Tag Manager o Enabled :- Enable the Extension by selecting Enabled field to Yes o Enable Order Analytics Information :- Enable the Order Analytics module by selecting this field to Yes o o o Additional Cookies to be tracked:- The cookie that you want information of, you can add that cookie name in this field Container ID:- Enter your container id here. You get this when you sign up with Google Tag Manager and create a container there Data Layer Name:-
You can change the data layer name to what you want. By default its name will be data Layer o Ecommerce Transactions:- Enable this field if you want the data layer to carry Transaction details. Transaction details could only be seen on order success page. 6.2 Frontend Functionalities As soon as you install this extension, you will have this script included in all your website source code pages. Then after, all you need to do is to sign up with Google Tag Manager and create a Container for your website. Creating the container will get you the Container ID. Enter this Container ID in the admin settings of Google Tag Manager. Here in the below screenshot, you can find the container id and the name you chose for your data layer
By default the data layer carries only visitor information. If you have enabled the ecommerce transactions, then you ll see the datalayer carrying transaction details as well on order success page. Now you are all ready to go to Google Tag Manager Interface and create tags for your website. 7. Technical Information The Google Tag Manager module has the following components Controllers: The Google Tag Manager Module doesn t override any core controller functionality Backend: This module has template files located in the path: app/design/adminhtml/default/default/layout/zeon/googletagmanager/orderan alytics.phtml And Layout files located in the path: app/design/adminhtml/default/default/layout/zeon/googletagmanager.xml Frontend: This module has some template files located in the path: app/design/frontend/enterprise/default/template/zeon/googletagmanager/goo gletagmanager.phtml And Layout file is located in the path: app/design/frontend/enterprise/default/layout/zeon/googletagmanager.xml Database Tables: The Google Tag Manager Module will insert one table i.e. zeon_sales_order_analytics in your database
8. Un-installation Below are the steps to un-install the application Remove design files from below folders o \app\design\frontend\enterprise\default\template\zeon\ : remove the template files of google tag manager o \app\design\frontend\enterprise\default\layout\zeon\ : remove the layout file google tag manager o \ app\design\adminhtml\default\default\template\zeon : remove the template files of google tag manager o \ app\design\adminhtml\default\default\layout\zeon\ : remove the layout file google tag manager Remove Module Activation file o Remove Zeon_GoogleTagManager.xml from \app\etc\modules\ folder Remove Module from Code o Remove files form app\code\local\zeon\ of GoogleTagManager Remove Locale file o Remove \app\locale\en_us\zeon_googletagmanager.csv Remove Database tables [Run below queries in database] o DROP TABLE ` <prefix> zeon_sales_order_analytics ` o DELETE FROM `<prefix>core_resource` WHERE <prefix>core_resource.code = 'zeon_googletagmanager_setup' o DELETE FROM `<prefix>core_config_data` WHERE <prefix>core_config_data.path LIKE '%<prefix>zeon_googletagmanager% 9. Unsupported Features & Known Issues 10. Troubleshooting