Data Layer

Apollo automatically builds a best practice data layer as you select business requirements or add Apollo events and attributes.

Updated over a week ago

Data Layers are an essential part of analytics implementations. They provide a level of abstraction between your analytics tool and your developers. Instead of developers having to learn the ins and outs of your digital analytics tool, you can show developers what data is needed in each scenario and they can provide that data. This reduces the time and effort required to complete your implementation. Data layers also make your analytics tagging more flexible since the same data layer can be used for multiple types of tag-based marketing tools.

The data layer generated by Apollo utilizes best practices learned over hundreds of analytics implementations. The data layer created by Apollo is an event driven data layer (EDDL), which provides the most flexibility and can be used on both static and dynamic (i.e. Single Page Apps) websites.

What are data layer specifications?

As business requirements are selected, Apollo programmatically builds your data layer specifications. Data layer specifications include the code your developers will need implement in order to collect data and information about the specific events.

You'll notice that each event specification on the Data Layer screen corresponds to an Apollo Event. You can expand the code requirements for an event by clicking Show Code. For example, if business requirements related to products added to cart are enabled and then you select Show Code, Apollo might reveal the following data layer specifications:

Which elements appear in your data layer specification is determined by the business requirements/Apollo Events selected. For example, in the preceding screenshot, there is an attribute called “cartID” that is used to capture a unique shopping cart identifier. This element would only appear if the corresponding business requirement related to cart identifiers was selected and/or if the Cart ID attribute had been selected within the Apollo events module.

The Data Layer Specification provides a preview of what documentation will later be sent to your developers in the Apollo Deploy - Data Layer Docs module. This happens by deploying a build to Data Layer Docs, which deploys the data layer specifications to a control management platform such as Github.

Customizing Your Data Layer

From the Data Layer screen you have the option of customizing the markdown file that will later be deployed. For any Event, start by selecting the Add Notes icon, which can be viewed for any expanded Event:

You can then add text, public web-hosted images, tables, links, etc. to each data layer/data enrichment event. This feature is a good way to give the developers developing against the data layer specifications any other additional information they may need to implement against the specifications properly.

You also have the option of customizing the notes in the Data Layer Docs at the implementation-level. Select the Add Implementation Notes button:

Apollo then shows you what the implementation notes will look like by default, but you can click Edit and then customize these notes to your liking.

These notes will make their way into your deployed data layer documentation the next time you deploy to Data Layer Docs.

Did this answer your question?