From c22541d186ec8c137d1f16d9dea34212c068c637 Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Wed, 2 May 2018 21:40:39 +0200 Subject: [PATCH] Mixer tracking --- tabs/configuration.js | 7 ++++--- tabs/mixer.js | 12 +++++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tabs/configuration.js b/tabs/configuration.js index 5fcd3ccd..19dba9cf 100644 --- a/tabs/configuration.js +++ b/tabs/configuration.js @@ -1,4 +1,4 @@ -/*global chrome*/ +/*global chrome,GUI,FC_CONFIG*/ 'use strict'; TABS.configuration = {}; @@ -713,8 +713,9 @@ TABS.configuration.initialize = function (callback, scrollPosition) { googleAnalytics.sendEvent('Setting', 'GpsProtocol', gpsProtocols[MISC.gps_type]); googleAnalytics.sendEvent('Setting', 'GpsSbas', gpsSbas[MISC.gps_ubx_sbas]); } - - googleAnalytics.sendEvent('Setting', 'Mixer', helper.mixer.getById(BF_CONFIG.mixerConfiguration).name); + if (!FC.isNewMixer()) { + googleAnalytics.sendEvent('Setting', 'Mixer', helper.mixer.getById(BF_CONFIG.mixerConfiguration).name); + } googleAnalytics.sendEvent('Setting', 'ReceiverMode', $('#rxType').val()); googleAnalytics.sendEvent('Setting', 'Looptime', FC_CONFIG.loopTime); diff --git a/tabs/mixer.js b/tabs/mixer.js index 8ccb985d..e1434380 100644 --- a/tabs/mixer.js +++ b/tabs/mixer.js @@ -1,4 +1,4 @@ -/*global $,helper,mspHelper,MSP,GUI,SERVO_RULES,MOTOR_RULES,MIXER_CONFIG*/ +/*global $,helper,mspHelper,MSP,GUI,SERVO_RULES,MOTOR_RULES,MIXER_CONFIG,googleAnalytics*/ 'use strict'; TABS.mixer = {}; @@ -149,6 +149,16 @@ TABS.mixer.initialize = function (callback, scrollPosition) { } function saveAndReboot() { + + /* + * Send tracking + */ + googleAnalytics.sendEvent('Mixer', 'Platform type', helper.platform.getList()[MIXER_CONFIG.platformType].name); + googleAnalytics.sendEvent('Mixer', 'Mixer preset', helper.mixer.getById(MIXER_CONFIG.appliedMixerPreset).name); + + /* + * Send mixer rules + */ SERVO_RULES.cleanup(); SERVO_RULES.inflate(); MOTOR_RULES.cleanup();