Integration vs Environment Configurations - evolv-ai/metrics GitHub Wiki

The metrics integration allows you to specify configuration data at both the integration level as well as the enviornment level.

This is done by using special top-level keys at the integration level. These keys are simply any key that is prefixed with an _. If these keys are not used at the integration level, the environment will override them.

Adding configuration at the integration level is good to capture things like boiler plate data. An example of this might be to capture utm data as shown here:

{
    "_base": {
        "source": "query",
        "type": "string",
        "apply": [
            {"tag": "campaign.source","key": "utm_source"},
            {"tag": "campaign.name", "key": "utm_campaign"},
            {"tag": "campaign.medium", "key": "utm_medium"},
            {"tag": "campaign.term","key": "utm_term"},
            {"tag": "campaign.content","key": "utm_content"}
        ]
    }
}

Another item that is good to capture is macros within a defmacros section. Macros