Example: Referrer - evolv-ai/metrics GitHub Wiki
Key Concepts
Example
The following shows examples of each of the type and options available.
{
"apply": [
{
"source": "expression",
"type": "string",
"apply": [
{
"tag": "referrer.searchEngine",
"key": "document.referrer",
"map": [
{"when": "google.com", "value": "google"},
{"when": "bing.com", "value": "bing"},
{"when": "search.yahoo", "value": "yahoo"},
{"when": "yandex.com", "value": "yandex"},
{"when": "duckduckgo.com", "value": "duckduckgo"}
]
},
{
"tag": "referrer.social",
"key": "document.referrer",
"map": [
{"when": "facebook.com", "value": "facebook"},
{"when": "youtube.com", "value": "youtube"},
{"when": "whatsapp.com", "value": "whatsapp"},
{"when": "instagram.com", "value": "instagram"},
{"when": "tiktoc.com", "value": "tiktok"},
{"when": "snapchat.com", "value": "snapchat"}
]
}
]
}
]
}