The Importance of Data Standards

.
April 28, 2023
The Importance of Data Standards

What are Data Standards?

Data Standards, according to the EPA (Environmental Protection Agency), are documented agreements on the representation, format, definition, structuring, tagging, transmission, manipulation, use, and management of data. Data Standards are widely used in every industry and shared among competitors to some degree. To successfully create Data Standards, an organization needs to reach an agreement on how to organize and define their information. This includes creating Data Standards for their web analytics or product analytics tools, such as GA4. If you are unfamiliar with GA4, check out our guide here.

In this article, we will focus on the thought process of how to create Data Standards for GA’s ‘purchase’ event. These same standards can be applied to the rest of the GA4 events.

Why Create Data Standards?

Many groups or departments within a company will want to share information with their coworkers, partners, and service providers or use the data for different purposes such as reporting. This will be difficult if the information is unstandardized. GA4 processes information in any format since it is meant to be customized by the user. For this reason, developers often use different formats to name or populate variables in the dataLayer.

Not having data standards can be quite costly for a company in terms of resources, communication, and can be a hindrance to reporting. A good example of unstandardized data is the date format. Here are some date format examples: YYYYMMDD, YYYY-MM-DD, YYYY/MM/DD, MM/DD/YYYY, DD/MM/YYYY.

Applying Data Standards to GA4

The best way to standardize the data in GA4 is by creating a dataLayer with specific rules and structure. The structure must include every transaction and product-level attribute. Every variable of the dataLayer must be defined, have an expected format, and be used consistently on any iteration of it.

The first step to take before creating custom events or custom definitions is to get familiar with GA4’s dataLayer documentation  to see which properties are provided by GA4 and which ones apply to the website or product. We will also need to follow Google’s standards. For example, Google requires that the currency be populated in the 3-letter ISO 4217 format.

The dataLayer can be used differently depending on the business’s needs. To illustrate how to apply Data Standards in the dataLayer we will use a music store as an example. Our music store is an international company that sells its products across markets and has different site editions. This example provides guidelines on the thought process of creating the basic Data Standards for the GA4’s ‘purchase’ event dataLayer.

The music store sells the following products: instruments, sheet music, strings, and accessories. Each product has different attributes. Here are the attributes for each product list:

Instruments:

Sheet Music:

Strings:

Accessories:

To translate these item lists, products, and attributes to GA4 we will need to map the attributes to the variables available for GA4:

As of now, the best way to add product-level dimensions in GA4 is to add the attributes to the item_category [2-6]. This means that GA4 allows 6 levels of product segmentation. The names of these variables do not describe any specifics of the value. Therefore, every item category level will need to be documented and used consistently across the website:

To keep consistency in reporting, every value must be displayed in English even if the user is in a site edition in a different language.

The next step would be to map the GA4 dimensions with the product lists since not all dimensions apply to every product:

Custom Dimensions

Every business is unique and will require different things to provide insights that GA4 will not provide by default. Custom dimensions will be able to provide this information. For example, suppose the shipping department of our music store requires a report to evaluate if orders are being shipped on time and another report to show where the products are being sent (country and city). GA4 only provides the purchase date and the location of the user’s IP address.

The new variables will be named:

Other departments might need more information and details of the purchase or the items, and these new requirements will need to be documented before adding them to any current implementation.

Final Version of the dataLayer

To visualize how this would look in a dataLayer we will create an items array with a collection of items. The item collection includes a black electric violin (SKU_12345), the music sheet of Tchaikovsky’s Violin Concerto (SKU_23456), an Evah Pirazzi string set (SKU_34567), and a violin polisher (SKU_45678).

Considering the item attributes and the requirements from the shipping department, the new purchase dataLayer would look like this:

dataLayer.push({
 event: "purchase",
 ecommerce: {
     transaction_id: "T_12345",
     value: 1841.97,
     tax: 128.94,
     shipping: 50.99,
     currency: "USD",

     shipping_date:"2023-07-04",

     shipping_country:"USA",

     shipping_city:"Miami",
     items: [
      {
       item_id: "SKU_12345",
       item_name: "Violin",
       item_brand:"Yamaha",
       item_category: "Electric",
       item_list_name: "Instruments",
       item_variant:"Black",
       price: 1700,
       quantity: 1
      },

      {
      item_id: "SKU_23456",
       item_name: "Violin Concerto in Dmajor",
       item_brand: "International MusicCompany",
      item_category:"Classical",
       item_category2:"Violin",
       item_category3:"Tchaikovsky",
       item_list_name:"Sheet Music",
       item_variant:"Expert",
       price: 29.99,
       quantity: 1
      },

      {
      item_id:"SKU_34567",
       item_name:"Violin String Set",
       item_brand:"Evah Pirazzi",
       item_category: "Acoustic",
       item_category2:"Violin",
       item_list_name: "Strings",
       item_variant: "Green",
       price: 99.99,
       quantity: 1
     },
     {
      item_id:"SKU_45678",
      item_name:"Varnish Cleaner",
       item_brand:"W.E. Hill & Sons",
       item_category: "Cleaning",
       item_category2:"Violin",
       item_list_name: "Accessories",
       item_variant: "Small",
       price: 11.99,
       quantity: 1
     }]
 }
});

These Data Standards should be used in all GA4 actions that apply to the business, such as select_item, view_item, add_to_cart, refund, etc. All GA4 event actions can be found here.

In summary, a good GA4 Data Standards documentation must include the following:

Facing the Music

Data Standards are documented agreements to represent the way data is described, represented, and structured. According to the Harvard Business Review, companies that treat data like a product can reduce the time it takes to implement it in new use cases by as much as 90%.

The key to successfully creating Data Standards is having consistent, detailed, and centralized documentation. Every parameter needs to have a clear definition and format so that every team knows how to implement and use it. The Data Standards should be aimed to be permanent, but they can be improved and expanded over time. A governance structure will be needed if a new standard becomes popular. New developments should always follow the existing rules.

As a consulting company, Blend360 can create Data Standards for every GA4 dataLayer to improve data analysis and data governance. The GA4 Data Standards will be determined with specific rules that define every data element and how it should be recorded, providing integrity, accuracy, and consistency. This will eliminate the need to translate naming conventions between different sections of the website and create guidelines for future implementations. To learn more about how we can help you improve your data governance and analysis, get in touch with us.

Download your e-book today!

Download your report today!

What are Data Standards?

Data Standards, according to the EPA (Environmental Protection Agency), are documented agreements on the representation, format, definition, structuring, tagging, transmission, manipulation, use, and management of data. Data Standards are widely used in every industry and shared among competitors to some degree. To successfully create Data Standards, an organization needs to reach an agreement on how to organize and define their information. This includes creating Data Standards for their web analytics or product analytics tools, such as GA4. If you are unfamiliar with GA4, check out our guide here.

In this article, we will focus on the thought process of how to create Data Standards for GA’s ‘purchase’ event. These same standards can be applied to the rest of the GA4 events.

Why Create Data Standards?

Many groups or departments within a company will want to share information with their coworkers, partners, and service providers or use the data for different purposes such as reporting. This will be difficult if the information is unstandardized. GA4 processes information in any format since it is meant to be customized by the user. For this reason, developers often use different formats to name or populate variables in the dataLayer.

Not having data standards can be quite costly for a company in terms of resources, communication, and can be a hindrance to reporting. A good example of unstandardized data is the date format. Here are some date format examples: YYYYMMDD, YYYY-MM-DD, YYYY/MM/DD, MM/DD/YYYY, DD/MM/YYYY.

Applying Data Standards to GA4

The best way to standardize the data in GA4 is by creating a dataLayer with specific rules and structure. The structure must include every transaction and product-level attribute. Every variable of the dataLayer must be defined, have an expected format, and be used consistently on any iteration of it.

The first step to take before creating custom events or custom definitions is to get familiar with GA4’s dataLayer documentation  to see which properties are provided by GA4 and which ones apply to the website or product. We will also need to follow Google’s standards. For example, Google requires that the currency be populated in the 3-letter ISO 4217 format.

The dataLayer can be used differently depending on the business’s needs. To illustrate how to apply Data Standards in the dataLayer we will use a music store as an example. Our music store is an international company that sells its products across markets and has different site editions. This example provides guidelines on the thought process of creating the basic Data Standards for the GA4’s ‘purchase’ event dataLayer.

The music store sells the following products: instruments, sheet music, strings, and accessories. Each product has different attributes. Here are the attributes for each product list:

Instruments:

Sheet Music:

Strings:

Accessories:

To translate these item lists, products, and attributes to GA4 we will need to map the attributes to the variables available for GA4:

As of now, the best way to add product-level dimensions in GA4 is to add the attributes to the item_category [2-6]. This means that GA4 allows 6 levels of product segmentation. The names of these variables do not describe any specifics of the value. Therefore, every item category level will need to be documented and used consistently across the website:

To keep consistency in reporting, every value must be displayed in English even if the user is in a site edition in a different language.

The next step would be to map the GA4 dimensions with the product lists since not all dimensions apply to every product:

Custom Dimensions

Every business is unique and will require different things to provide insights that GA4 will not provide by default. Custom dimensions will be able to provide this information. For example, suppose the shipping department of our music store requires a report to evaluate if orders are being shipped on time and another report to show where the products are being sent (country and city). GA4 only provides the purchase date and the location of the user’s IP address.

The new variables will be named:

Other departments might need more information and details of the purchase or the items, and these new requirements will need to be documented before adding them to any current implementation.

Final Version of the dataLayer

To visualize how this would look in a dataLayer we will create an items array with a collection of items. The item collection includes a black electric violin (SKU_12345), the music sheet of Tchaikovsky’s Violin Concerto (SKU_23456), an Evah Pirazzi string set (SKU_34567), and a violin polisher (SKU_45678).

Considering the item attributes and the requirements from the shipping department, the new purchase dataLayer would look like this:

dataLayer.push({
 event: "purchase",
 ecommerce: {
     transaction_id: "T_12345",
     value: 1841.97,
     tax: 128.94,
     shipping: 50.99,
     currency: "USD",

     shipping_date:"2023-07-04",

     shipping_country:"USA",

     shipping_city:"Miami",
     items: [
      {
       item_id: "SKU_12345",
       item_name: "Violin",
       item_brand:"Yamaha",
       item_category: "Electric",
       item_list_name: "Instruments",
       item_variant:"Black",
       price: 1700,
       quantity: 1
      },

      {
      item_id: "SKU_23456",
       item_name: "Violin Concerto in Dmajor",
       item_brand: "International MusicCompany",
      item_category:"Classical",
       item_category2:"Violin",
       item_category3:"Tchaikovsky",
       item_list_name:"Sheet Music",
       item_variant:"Expert",
       price: 29.99,
       quantity: 1
      },

      {
      item_id:"SKU_34567",
       item_name:"Violin String Set",
       item_brand:"Evah Pirazzi",
       item_category: "Acoustic",
       item_category2:"Violin",
       item_list_name: "Strings",
       item_variant: "Green",
       price: 99.99,
       quantity: 1
     },
     {
      item_id:"SKU_45678",
      item_name:"Varnish Cleaner",
       item_brand:"W.E. Hill & Sons",
       item_category: "Cleaning",
       item_category2:"Violin",
       item_list_name: "Accessories",
       item_variant: "Small",
       price: 11.99,
       quantity: 1
     }]
 }
});

These Data Standards should be used in all GA4 actions that apply to the business, such as select_item, view_item, add_to_cart, refund, etc. All GA4 event actions can be found here.

In summary, a good GA4 Data Standards documentation must include the following:

Facing the Music

Data Standards are documented agreements to represent the way data is described, represented, and structured. According to the Harvard Business Review, companies that treat data like a product can reduce the time it takes to implement it in new use cases by as much as 90%.

The key to successfully creating Data Standards is having consistent, detailed, and centralized documentation. Every parameter needs to have a clear definition and format so that every team knows how to implement and use it. The Data Standards should be aimed to be permanent, but they can be improved and expanded over time. A governance structure will be needed if a new standard becomes popular. New developments should always follow the existing rules.

As a consulting company, Blend360 can create Data Standards for every GA4 dataLayer to improve data analysis and data governance. The GA4 Data Standards will be determined with specific rules that define every data element and how it should be recorded, providing integrity, accuracy, and consistency. This will eliminate the need to translate naming conventions between different sections of the website and create guidelines for future implementations. To learn more about how we can help you improve your data governance and analysis, get in touch with us.