Skip to content

Ceddl4j: What & why?

Sieger Veenstra edited this page Jun 23, 2015 · 7 revisions

Ceddl4j is a Java component for generating a website data layer compliant with the Customer Experience Digital Data Layer (CEDDL) specification.

Ok, cool! But what is a website data layer and CEDDL?

Before I can answer this question let’s go back a little bit. Most modern website do include some sort of web analytics tool like for example Google Analytics or Adobe Analytics (aka Omniture SiteCatalyst).

In a modern implementation, the web analytics code is not directly added to the page, but the web analytics code is served from a Tag Management System (TMS) instead. Tag Management System include products like Google Tag Manager and Adobe Tag Manager.

Very often a TMS is considered just a tool to easily implement and change your web analytics code, but it can do much more than that. Think about advertising (measuring conversions and retargeting), A/B testing, ‘Voice if the customer’ tools, surveys. Live chat and online help.

Almost every marketing tool (as-a-service) can be integrated on a website via a TMS. In a blog article last year a new name for this category of tools was proposed: ‘Marketing middleware’ (See http://chiefmartec.com/2014/06/tag-management-software-marketing-middleware/)

Marketing middleware?

Middleware is software designed to connect different systems, for example a message queue or enterprise service bus. A TMS has the same role: connect different marketing tools to your website.

The rules in a TMS require data about the visitor. For example: You want to show a survey after a user views a specific product. The TMS then needs to know which product the user is viewing.

Often this is solved with ‘HTML’ scraping. For example the product name is found inside a certain

tag in the HTML. This can however easily break when the HTML changes. Also you can only use the data which is visible on the screen.

(Certain Middleware also works this way: IBM sells middleware that ‘sceen scrapes’ data from mainframe terminals.)

A website data layer as your website’s marketing API

A website data layer is an alternative for ‘HTML’ scraping. The data layer provides data in an agreed format to the TMS. The data layer is kept completely separate from the information the visitor sees. This means the website can be changed without risk of breaking any marketing tool. Effectively this makes the data layer into your website’s (marketing tools) API.

From a technical point of view a data layer is implemented in a JavaScript object.

What is CEDDL?

The CEDDL specification consists of a standard design for a website data layer. The specification addresses (almost) everything needed to describe a visitor’s visit to a website, including:

  • Which page does the visitor visit?
  • Which components are on the page?
  • Which interaction does the user have with the page?
  • Which products does he view?
  • Which products are in the visitor’s cart?
  • Who is the visitor?

Below an example CEDDL data layer with page and product information:

digitalData = {
  "pageInstanceID": "ProductDetailPageNikonCamera-Staging",
  "page": {
    "pageInfo": {
      "pageID": "Nikon Camera",
      "destinationURL": "http://mysite.com/products/NikonCamera.html"
    },
    "category": {
      "primaryCategory": "Cameras",
      "subCategory1": "Nikon",
      "pageType": "ProductDetail"
    },
    "attributes": {
      "Seasonal": "Christmas"
    }
  },
  "product": [
    {
      "productInfo": {
        "productName": "Nikon SLR Camera",
        "sku": "sku12345",
        "manufacturer": "Nikon"
      },
      "category": {
        "primaryCategory": "Cameras"
      },
      "attributes": {
        "productType": "Special Offer"
      }
    }
  ]
}

Some of the elements in the example above are reserved in the standard. Other elements are extensions which are not part of the standard. When implementing CEDDL you are free to add elements as needed.

The CEDDL specification was created by the W3C Customer Experience Digital Data Community Group. This is a community group within W3C meaning the specification doesn’t have the same status as an official W3C specification, but the specification has been created by employees of leading web analytics, tag management and other online marketing tools, like IBM, Google and Adobe.

The complete CEDDL 1.0 specification from December 2013 can be found at: http://www.w3.org/2013/12/ceddl-201312.pdf

Ok, so what can I do with Ceddl4j?

Ceddl4j allows you to build a CEDDL data layer from Java code. It provides a ‘fluent’ API for this.

The data layer from the example above can be created with the following code:

DigitalData ddb = DigitalData.create("ProductDetailPageNikonCamera-Staging")
.page()
.pageInfo()
.pageID("Nikon Camera")
.destinationURL("http://mysite.com/products/NikonCamera.html")
.endPageInfo()
.addPrimaryCategory("Cameras")
.addCategory("subCategory1", "Nikon")
.addCategory("pageType", "ProductDetail")
.addAttribute("Seasonal", "Christmas")
.endPage()
.addProduct()
.productInfo()
.productName("Nikon SLR Camera")
.sku("sku12345")
.manufacturer("Nikon")
.endProductInfo()
.addPrimaryCategory("Cameras")
.addAttribute("productType", "Special Offer")
.endProduct();

For more information, documentation, more examples and the source code, please see the page on Github. Also read the Getting started guide

We have also published Ceddl4j to the Maven Central Repository, so anyone can easily add it to their project. You can find the dependency information on the Github page.

Clone this wiki locally