Commit 8a90679d by Chris

feat: update gtag legacy compatability

parent 8b719f45
......@@ -206,8 +206,14 @@ class Foresight {
return window['gtag']('event', data.action, {
...data.metrics,
...data.dimensions,
...(data.label ? { label: data.label } : {}),
...(data.category ? { category: data.category } : {}),
...(data.label ? {
label: data.label,
event_label: data.label, // gtag legacy compatibility
} : {}),
...(data.category ? {
category: data.category,
event_category: data.category, // gtag legacy compatibility
} : {}),
'non_interaction': !data.interaction
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment