Skip to content
Snippets Groups Projects
Commit 0ecd9b10 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

add version to GA event tracking.

parent 60625c6d
No related branches found
No related tags found
No related merge requests found
/*global ga*/
import MetabaseSettings from "metabase/lib/settings";
// Simple module for in-app analytics. Currently sends data to GA but could be extended to anything else.
var MetabaseAnalytics = {
// track a pageview (a.k.a. route change)
......@@ -15,8 +18,11 @@ var MetabaseAnalytics = {
// track an event
trackEvent: function(category, action, label, value) {
const { tag } = MetabaseSettings.get('version');
// category & action are required, rest are optional
if (category && action) {
ga('set', 'dimension1', tag);
ga('send', 'event', category, action, label, value);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment