Google Tag Manager
Google Tag Manager helps you manage the many tags, or snippets of code, that are related to your marketing campaign events. Google Tag Manager gives you the ability to add tracking tags to your site to measure the audience, or to personalize, retarget, or conduct search engine marketing initiatives.
Google Tag Manager directly transfers data and events to Google Analytics, Enhanced Ecommerce and other third-party analytics solutions, to produce a clear picture of how well your site, products, and promotions are performing.
You should have a Google Analytics and Tag Manager account to continue this process. The following instructions walk you through the process of configuring your Google accounts, configuring your Magento store, and creating a tag.
For additional information, see Google's Set up Site Search. These instructions provide the basics to get started.
|1.||Sign in to your Google Analytics account.|
|2.||To enable Internal Site Search Tracking, do the following:|
|a.||Navigate to Select View > View Settings.|
|b.||Turn Site Search Tracking On.|
|c.||Set Query parameter to “q”.|
|d.||When complete, Save the settings.|
|3.||To enable display features, do the following:|
|a.||Choose Property Settings.|
|b.||Under Advertising Features, set Enable Demographics and Interest Reports to “On”.|
|c.||Save the settings.|
|4.||To enable Ecommerce Tracking, do the following:|
|a.||Navigate to Select View > Ecommerce Settings.|
|b.||Set Enable Ecommerce to “On”.|
|c.||Set Enable Enhanced Ecommerce Reporting to “On”.|
|d.||Save the settings.|
|5.||Reload the page to verify that all the settings remain “On”.|
If not all settings are “On,” repeat the previous steps, save, and reload the page. Repeat this process until all settings are set to “On”.
The following instructions show how to configure a new container with the basic settings. A sample Composer configuration (.json) file is used to simplify the process, importing to generate a tag in a new container. For this example, we recommend that you create a new container, rather than modify an existing container.
For additional information, see Google's Container export and import. These instructions walk-through importing a sample JSON to a new container.
|1.||Right-click this link: GMT_M2_Config_json.txt. Choose Save link as to download the sample text file. Then, do the following:|
|a.||Open the file in an editor, and save as GMT_M2_Config.json.|
|b.||Zip the file to produce an archive called GMT_M2_Config.zip.|
The zipped file will be uploaded directly to Google Tag Manager, and does not need to be copied to your server.
|2.||Navigate to Admin > Container > Import Container.|
|3.||Tap Choose container file and select the json file.|
|4.||Under Choose workspace, tap New. Enter a title and description, then tap Save.|
|5.||Select one of the following actions to import the file:|
- The Overwrite option should be selected for the new container.
- The Merge option should be selected is you are using an existing container.
|6.||Tap Preview to review the tags, triggers, and variables.|
|7.||To edit the Google Analytics ID that is referenced in variables, do the following:|
|a.||Navigate to Variables > User-Defined Variables.|
|b.||Choose Google Analytics. Then, update the placeholder (UA-xxxxxx-x) with your own GA ID.|
|8.||Follow Google’s instructions to add tags, triggers, and variables to the new container.|
If you have settings in another container that you want to use, they can be moved to the new container.
|9.||Tap Confirm when complete. Follow Google’s instructions to publish the new container.|
|1.||Log in to the Admin of your Magento store.|
|2.||On the Admin sidebar, tap Stores. Then under Settings, choose Configuration.|
|3.||In the panel on the left under Sales, choose Google API.|
|4.||Expand the Google Analytics section, and configure:|
|a.||Set Enable to “Yes.”|
|b.||Set Account type to “Google Tag Manager.”|
|c.||In the Container ID field, enter your GTM ID. (GTM-xxxxxx)|
|d.||If you are also using Google Analytics to content experiments, set Enable Content Experiments to “Yes.”|
|e.||Use the default values for the remaining fields.|
|5.||When complete, tap Save Config .|
|6.||Test your Google Tag Manager settings to verify that everything works correctly.|
Determines if Google Analytics Enhanced Ecommerce can be used to analyze activity in your store.
Options include: Yes / No
Determines the Google tracking code that is used to monitor store activity and traffic. Options include:
Google Tag Manager
Determines if identifying information is removed from IP addresses that appear in Google Analytics results.
Enable Content Experiments
Activates Google Content Experiments, which can be used to test up to ten different versions of the same page. Options: Yes / No
If Google Tag manager is already installed and configured for your store, the Container ID appears automatically in this field.
List property for the catalog page
Identifies the Tag Manager property associated with the catalog page. Default value: Catalog Page
List property for the cross-sell block
Identifies the Tag Manager property associated with the cross-sell block. Default value:Cross-sell
List property for the up-sell block
Identifies the Tag Manager property associated with the up-sell block. Default value: Up-sell
List property for the related products block
Identifies the Tag Manager property associated with the related products block. Default value: Related Products
List property for the search results page
Identifies the Tag Manager property associated with the search results page. Default value: Search Results
“Internal Promotions” for promotions field “Label”
Identifies the Tag Manager property associated with the labels for internal promotions. Default value: Label