Myweblogin Knowledge Base

Enhanced ecommerce tracking with Google Tag Manager

Flower Store In a box integrates with Google Tag Manager to add enhanced ecommerce events into the Data Layer for tracking.  This allows more advanced ecommerce tracking you can turn on when using “enhanced Ecommerce tracking with Google Tag Manager”.  This allows you to track:

  • Product Impressions
  • Sales Data
  • Add to Cart Data
  • Purchase Data
  • Steps to checkout Data

In additional you can also analyze your sales against more dimensions including:

  • Product Position on Page
  • Product Category Page

How to enable enhanced eCommerce on Flower Store In a Box

Firstly you need to sign up with Google Tag Manager:

https://tagmanager.google.com/#/home

Google Tag Manager (GTM) allows you to easily add plugins, scripts, codes and snippets into your website without having to worry about adding them into the code of the site.  It also allows to link your Google Analytics account without adding the tracking code to your site.

GTM allows quite granular control of how added snippets load on your site whether a specific page or the order in which they fire.

GTM also allows access to extra ecommerce data from your website to further understand the use of your site.

You can add the GTM code to your main template and then save the template.

Once this is done you can turn on enhanced ecommerce tracking here:

  1. Go to Main Settings
  2. Choose Tracking Codes
  3. Click enhanced Analytics
  4. Scroll to the bottom and save the page.

What Events are tracked

Flower Store In a Box adds the following events into the data layer for analysis and tracking:

  • Product Impressions
  • Product Details
  • Add / Remove from Cart
  • Start Checkout Step 1
  • Checkout Payment Step 2
  • Purchase Data

Product Impressions

Each time a product appears on a product page the order the impression order of the product as well as the product details (price, name URL, Image) is sent to the data layer.  This is useful to understand if the position of a specific product on a page has an impact on the sales or add to cart data.

Product Details

The product details of a product are sent to the data layer:

Name

ID

Price

Brand (name of website)

Add / Remove from Cart

When an item is added to or deleted from a shopping cart this data is sent to the data layer.  This is useful for cart abandonment and analyzing consumer behavior.

Start Checkout Step 1

When the customer starts the checkout process and views the first page of the checkout.

Checkout Payment Step 2

When a customer adds the checkout and chooses which payment option to use this data is sent to the data layer.

Purchase Data

When the transaction is completed the order and items purchased are sent to the data later including:

Name

ID

Price

Brand (name of website)

Number sold

Total Value

Setting up the ecommerce funnel in Google Analytics

The ecommerce funnel has three steps:

Step 1 -> Billing / Delivery Information

Step 2-> Payment

Step 3 -> Purchase

To configure these names, visit the Admin section of the Google Analytics Web Interface, select the view (profile) and click on Ecommerce Settings. Follow the Ecommerce set-up instructions to label each checkout step you intend to track.

Sale Conversion

When a sale is completed on the website the following data is sent to the data layer:

<script>
var dataLayer = dataLayer || [];


dataLayer.push({
   "event":"transaction",
   "ecommerce": {
     "purchase": {
       "actionField": {
         "id":"4whpi6638e", 
         "affiliation":"Flower Store In a Box Demo - Website",
         "revenue":"150.00", 
         "tax":"30.00",
         "shipping":"100.00",
         "coupon":"" 
      },
       "products": [{
         "id":"00000ws229",
         "name":"Island",
         "price":"50.00",
         "brand":"Flower Store In a Box Demo",
         "category":"",
         "variant":"Special Price!",
         "position":"0",
         "quantity":"1"
      }]
    }
  }
});


</script>

Added: 2020-8-13 and last modified: 2023-6-07
Related Topics