Customize the data layer converter

Customize the behavior of the converter using the following utility functions:


Specify the strings of text that, if a key in the object starts with this text, that key will not be ingested.

Example Object:

teal.ignore_keys = {
  "user" : 1,
  "util" : 1

This action will result in all keys from the source data object being skipped if they begin with the string “user” or “util”.


Set the string to use to prefix all key names that are converted. For example, If you are merging utag_data and dataLayer, you can set the converted variables with a prefix of dl_. Using the dataLayer example from above, the converted object would contain:

   "dl_user.userInfo.sub_industry" : "data & technical services",
   "dl_user.userInfo.web_site"     : ""


Set the character used to delimit the subkey names in the converted names. The default delimiter is the period character (.).


Specify new names for converted keys. You can either replace a key name with a new name or remove the key.


teal.replace_keys = {
    "pageInfo" : ""

The source object contains pageInfo, which you want to appear as pi in the converted object, for example, changes to

Was this page helpful?

This page was last updated: January 7, 2023