How do I view Tangiblee performance metrics within my own GA?
Please follow the steps outlined in this article in order to view Tangiblee events within your own Google Analytics (GA).
Collecting Tangiblee Performance Metrics when you have Semi-Managed or Self-Service Integration
Overview
The purpose of this document is to specify how to set up analytics, in order to track Tangiblee performance on your website.
Once performance tracking has been configured and tested, the Tangiblee team can provide ongoing performance results showing the value that Tangiblee delivers to the client.
Performance metrics consist of 2 parts:
- Metrics from the Product Details Page (PDP)
- Order Tracking
Performance metrics can be configured by the Tangiblee team or by your team, depending on which type of integration you chose.
Semi-Managed
With this option, we'll provide you with the initial code for tracking metrics on PDP and Order Tracking. You host this code and can update transaction variables in case the data layer changes.
Example of mapping code on PDP:
Example of mapping code for checkout page:
Self-Service
To collect metrics from PDP, first of all, you need to declare tangibleeAnalytics object (assuming you already configured CTA):
In case of an A/B test you should also configure the variation name (Tangiblee is a default value):
Now you can start to configure analytics.
All analytics logic split into plugins. Every plugin is responsible for its provider and should be configured using a method called setAnalyticsPlugin.
There are 2 main analytics plugins at the moment:
1. InfoPortalAnalytics - this analytics provider sending data to our portal https://info.tangiblee.com
EXAMPLE:
We don't have any config for this provider so it's very easy to setup:
2. Google Analytics - This is a GA provider (analytics.js).
EXAMPLE:
- As you can see, there are many parameters here, but only one is required (trackingId):
- trackingId - ga account ID. Required parameter.
- googleAnalyticsObject - can be string or function which return object. Default value 'ga', which means we are using window['ga'].
- forceGaScriptInjecting - if there is no analytics.js on the page you can force to inject it by setting this flag to true.
- ecommerceTracking - if order tracking enabled - set this flag to true. True by default.
- enhancedEcommerce - if we need to use enhanced commerce - set this to true. False by default.
- inPageAnalytics - if this flag false we create our own ga tracker, otherwise using client's tracker.
- trackerName - ga tracker name (tangiblee by default). If we are using client's tracker we should specify which tracker to use.
- userCustomerTrackingId - use this flag when customer's tracking id on our tracker is needed
- customTangibleeDimension - customTangibleeUserDimension - when we are using the client's tracker, we should ask them to create our 5 CDs and share indexes with us, then we should set up them in config.
NOTE: you can setup a few GA trackers as well, for example, send data to our and your own tracker at the same time:
NOTE: Order Tracking for plugins with inPageAnalytics==true is skipped (to avoid sending it twice to client's GA).
Order Tracking
To collect order tracking, place our tangibleeAnalytics library on the checkout page:
Then you need to declare tangibleeAnalytics object:
There are 2 ways to configure order tracking:
1. Call trackOrder on thank you page directly.
2. Set auto-tracking - tangibleeAnalytics will automatically send the order by specified parsing function and URL where we should run.
Where trackOn is thank you page URL and parseOrder which returns order data in format from way 1.