User GuideSetup


Sana Commerce 9.1
Your connector

Google Tag Manager

Here are some possibilities and advantages which GTM provides to improve your online business management: 
  • You can add and update Google AdWords tags, Analytics tags, DoubleClick Floodlight tags and many non-Google third-party tags directly from Google Tag Manager, instead of editing the website code.
  • Google Tag Manager also allows you to install a basic implementation of Google Analytics via Google Tag Manager.
  • GTM is equipped with Auto-Event Tracking functionality. You can create event tags directly within the Google Tag Manager interface and fire them with triggers. It will help to track and understand customers' actions.
  • Its built-in debug features allow to test and debug each update on your site prior to publication, ensuring that your tags work properly before they are live.

To start your work with Google Tag Manager you will need to do the following:

  • Create Google Tag Manager Account (this account will be used for Google Analytics as well).
  • Set up container and enter the container ID into Sana Admin.
  • Configure Google Tag Manager for your webstore.

For more information about Google Tag Manager usage and its basic configuration, see 'Getting Started'.

Google Tag Manager provides a lot of great tools. In this article we give you one of the common scenarios of how to set up Google Tag Manager with Google Analytics for the Sana Commerce webstore. For more information about Google Tag Manager features and tools, and how to set up them, refer to the official Google documentation.

How to set up Google Tag Manager for the Sana Commerce webstore?

Step 1: Create Google Tag Manager Account.

Step 2: Set up Google Tag Manager Container.

When container is created, you will see the container ID (formatted as 'GTM-XXXXX') which is automatically generated by GTM.

For more information, see 'Creating an account and container'.

Step 3: Copy the container ID and paste it into Sana Admin: Setup > Marketing > Analytics.

Set up Google Analytics via Google Tag Manager

Google Tag Manager integrated with Google Analytics reduces errors, allows to quickly deploy tags on your webstore and thus makes the tracking procedure easier.

Google Analytics is a free analytics tool that enables you to gather all kind of information and generate reports that will help you with your marketing.

Integrating your webstore with Google Analytics is a simple process that will give you access to the detailed statistics of the traffic in your webstore, like page views, webstore visitors, transactions, users interactions with your webstore content, and their shopping behavior.

To start using Google Analytics:

Step 1: In Google Tag Manager, click Container > Tags > New and then choose the Google Analytics product.
Step 2: Enter the tag title and select Universal Analytics tag type.
Step 3: Enter your Google Analytics Tracking ID. It can be either Analytics property ID or gaProperty variable.
Step 4: Choose the Track Type.

For basic Google Analytics tracking, add a single Google Analytics tag and select Page View as the track type. Add a trigger to fire the tag on all pages. If basic tracking is all you need, you'll just add this single Google Analytics tag. However, if you track events or ecommerce transactions, you'll need to add additional Google Analytics tags.

The most suitable track type for ecommerce tracking is Event tracking, which is used to track a specific action or event, such as a button click. Below you can see the list of events that are supported by the Sana Commerce webstore and which you can set up in Google Tag Manager.

To get more information about other track types, see 'Deploying Google Analytics'.

Step 5: When the Event track type is selected enter Category name and Action. The category name can be anything that reflects the action you want to track. The Action value is used to name the type of event or interaction you want to track for a particular web object.

The table below provides the list of actions which can be tracked on the Sana Commerce webstore.

Action Description
impression Triggers on the product list and search results pages, and when the last viewed products are shown. Measured when the page loads and is sent with the initial page view.
detail A view of products details.
productClick A click on a product or product link for one or more products.
addToCart Adding one or more products to a shopping cart.
removeFromCart Remove one or more products from a shopping cart.
checkout Initiating the checkout process for one or more products.
checkoutOption Sending the option value for a given checkout step.
purchase The sale of one or more products.

Step 6: Click: More settings > Ecommerce Features. Enable Enhanced Ecommerce Features / Use data layer for a tag which allows you to see when customers have added items to their shopping carts, when they have started the checkout process, and when they have completed a purchase.

Step 7: Choose your firing triggers. The best trigger for event tracking is Custom Event with the expected event name, but you can select other triggers suitable for your scenario.

To configure Custom Event trigger click: More > New > Custom Event. Enter the title of the trigger and Event name. The event name should be the same as the name of the action. You can also configure the filters for the custom even trigger.

For more information about tag firing, see 'Triggers'.

Step 8: Click Create Tag. Now you are ready to preview, debug, and publish this tag.

When Google Tag Manager is configured with Google Analytics you can check the shopping and purchasing behavior of your webstore visitors and customers. Each time when a user performs some action in the webstore, like views the product details or adds a product to the shopping cart, a certain event is triggered, and the information about this action is sent to and tracked by Google Analytics. The shopping analysis reports give you insight into shopping activity: product and product list views, adding and removing products from shopping carts, initiated, abandoned, and completed transactions.

User GuideSetup