Giter VIP home page Giter VIP logo

ga_enhanced_ecommerce_for_gtm's Introduction

GAecommerce

Google Analytics Enhanced Ecommerce v 092018

This guide describes how to implement Universal Analytics Enhanced Ecommerce features using Google Tag Manager on a website.

Overview

Google Analytics Enhanced Ecommerce enables product impression, promotion, and sales data to be sent with any of your Google Analytics pageviews and events. Use pageviews to track product impressions and product purchases; and use events to track checkout steps and product clicks.

Before you Begin

We recommend reviewing the Enhanced Ecommerce Data Types and Actions section of the Enhanced Ecommerce Dev Guide to help you plan your implementation. The guide will help you understand which fields are required and optional for each of the ecommerce interactions you want to measure.

Enabling Enhanced Ecommerce

In most implementations, you should enable Enhanced Ecommerce on each of your Universal Analytics pageview or event tags. You have two options for enabling Enhanced Ecommerce in the tag editor screen of the web interface:

  • Implement using the Data Layer (Recommended)
  • Implement using a Custom JavaScript Macro

Although both methods provide equivalent ecommerce functionality, we recommend all websites that support a data layer use the Data Layer method. This guide presents the Data Layer method as the default, while Using a Custom JavaScript Macro is documented at the end of this guide.

Using the Data Layer

The following sections will show you how to use the data layer to measure the following enhanced ecommerce activities:

Measuring Product Impressions

  • Ecommerce Measurement: 

impressions

  • Accepts Data: array of 

impressionFieldObjects

Measure product impressions by using the 

impression action and one or more 

impressionFieldObjects. The following example assumes details about the products displayed on a page are known at the time the page loads:

Measuring Product Clicks

  • Ecommerce Measurement: 

click

  • Accepts Data: 

list, array of 

productFieldObjects

Measure clicks on product links by pushing a 

click action to the data layer, along with a 

productFieldObjectto represent the clicked product, as in this example:

Measuring Views of Product Details

  • Ecommerce Measurement: 

detail

  • Accepts Data: 

list, array of 

productFieldObjects

Measure a view of product details by pushing a 

detail action to the data layer, along with one or more 

productFieldObjects representing the products being viewed:

Measuring Promotions

You can measure both impressions and clicks on internal site promotions, such as banners displayed on the site itself advertising a sale on a particular subset of products, or an offer for free shipping.

Measuring Promotion Impressions

  • Ecommerce Measurement: 

promoView

  • Accepts Data: array of 

promoFieldObjects

To measure a promotion impression, set the 

promoView key in your ecommerce data layer var to a 

promoFieldObject that describes the promotions displayed to users on the page:

ga_enhanced_ecommerce_for_gtm's People

Stargazers

 avatar Fırat Oltulu avatar Abimael Domínguez avatar DotCollective Support avatar Shoora avatar

Watchers

James Cloos avatar Marco avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.