In one of the previous posts my colleague Kamil outlined a 7 step plan to build a Data Strategy for your organization. In this article I would like to focus on an area that sits within 4th element of the plan – high level architecture design, capturing website/ecommerce data via analytics tool.
Foundation for analytics
Web data collection is the foundation for future analysis, reporting and optimization. That is why it is critical to understand and implement it following good practices.
Every web analytics tool have some build in, default reports like number of visits per URL or bounce rate per page. To be able to use them just a simple JavaScript code on every page is required. However in order to produce meaningful insight to drive decisions for your e-business custom variable and event tracking is necessary.
Ecommerce tracking example
In the table below you can see an exemplary list of variables to be tracked for a typical ecommerce website. The first row includes a split by where the tracking activity takes place – outside of your site or on site.
Where? | Traffic to site | On site | ||||
---|---|---|---|---|---|---|
How? | QSP | DATA LAYER | ||||
What? | traffic sources | internal sources | page structure | product | events | purchase |
Examples | source | navigation | registered user id | SKU | registration | order id |
medium | recommeded | internal search | price | add to cart | transaction revenue | |
campaign name | banners | page name | taxonomy e.g. category | add to whish list | item revenue | |
term | landing page | error page e.g. 404 | product name | subscription | currency | |
content | search | group, subgroup | availability | file download | SKUs | |
booking step no | star rating | video watched | custommer id | |||
registration step no | no of reviews | share/social | taxonomy e.g. category | |||
no of search results | location | contact us | promo code used | |||
form errors | product name | |||||
form completion | shipping | |||||
scroll reach | tax | |||||
image interaction |
Traffic source tagging
Traffic that is sent to your site (paid search, newsletters, display ads) has to be tagged, which means that every landing page url needs to include information about its origin. This information has to be passed via query string parameters (QSP) e.g. www.mysite.com/?utm_source=newsletter&utm_medium=email&utm_campaign=supersale. It is very important to create traffic source structure before you start any activity.
As a good practice it is worth to build a tool for automatic tagging- url builder. Such a tool can help maintain consistent traffic source structure. Being consistent with the agreed traffic source schema is a key to success when analyzing collected data later. This is super important for reporting campaigns performance or providing attribution analysis.
Internal drivers
When traffic hits the site it can flow through different internal links, so called internal drivers e.g. navigation, banners, recommended offers, top sellers etc. It is worth to identify and track them all. Knowing this information helps to understand and optimize how users use your website. Internal drivers can be tracked similarly to traffic sources via query string parameters in the URL e.g. www.mysite.com/?ref=navigation
On site tracking via data layer
Remaining four sections – page structure, product, events and purchase refer to variables and events that can be found within website when users navigates through different pages. All such kind of information should be tracked via data layer, also called customer experience digital data.
Data layer is a JavaScript object that sit on every page and stores information that describe the current website e.g. user is on a product page, of a product X, that has price $34 or user clicked add to basket.
Data layer concept has been standardized by W3C (World Wide Web Consortium). Detailed document about it can be downloaded HERE. Backend system of your site should send information to data layer object. Then ideally this should be picked up by tag management system and passed to web analytics tool.
Digital analysts, website implementation engineers and marketing professionals who need to understand and analyze website data should be familiar how it works.
Important, nice to have and low priority
If you start a website it is recommended to apply lean approach and track just minimum that is necessary and later expand your data collection space. That is why defining variable/event importance is key.
Exemplary elements in the table below are marked with different colors. Red means that certain variable is critical for data collection, further reporting and analysis e.g. you have to pass order id and transaction revenue to be able to report and analyze website conversion.
Yellow color means a variable or event that is nice to have, but does not impact optimization or analysis significantly. E.g. if your site has add to wish list button then it would be quite valuable to see how it is utilized or use the data as a product relevancy driver.
White cells mean low importance. Bear in mind that this is just an example for a typical ecommerce site and can be helpful when creating your own data collection requirements spec.