From c74880756f10fbcc69ca8431b631a45d9c6b7174 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Fri, 16 Sep 2016 14:13:53 -0700 Subject: [PATCH 1/2] Pendo should not issue identity when turned off Fixes an issue whereh the identity was issued to the Pendo agent despite an "analytic_status": "off" --- .../authenticationServices/pendo.service.js | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/awx/ui/client/src/login/authenticationServices/pendo.service.js b/awx/ui/client/src/login/authenticationServices/pendo.service.js index dbfe407820..3eaf06e0b0 100644 --- a/awx/ui/client/src/login/authenticationServices/pendo.service.js +++ b/awx/ui/client/src/login/authenticationServices/pendo.service.js @@ -100,15 +100,21 @@ export default config.analytics_status = c.analytics_status; config.version = c.version; config.ansible_version = c.ansible_version; - options = this.setPendoOptions(config); - this.setRole(options).then(function(options){ - $log.debug('Pendo status is '+ config.analytics_status + '. Object below:'); - $log.debug(options); - $pendolytics.identify(options); - }, function(reason){ - // reject function for setRole - $log.debug(reason); - }); + if(config.analytics_status === 'detailed' || config.analytics_status === 'anonymous'){ + $pendolytics.bootstrap(); + options = this.setPendoOptions(config); + this.setRole(options).then(function(options){ + $log.debug('Pendo status is '+ config.analytics_status + '. Object below:'); + $log.debug(options); + $pendolytics.identify(options); + }, function(reason){ + // reject function for setRole + $log.debug(reason); + }); + } + else { + $log.debug('Pendo is turned off.') + } } }; } From 654633f556ea4ad2f97f8258c917b4fbc276291a Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Fri, 16 Sep 2016 14:53:58 -0700 Subject: [PATCH 2/2] Fix for Pendo if trial key/value pair is missing from the config endpoint -> license_info --- .../client/src/login/authenticationServices/pendo.service.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/ui/client/src/login/authenticationServices/pendo.service.js b/awx/ui/client/src/login/authenticationServices/pendo.service.js index 3eaf06e0b0..10cdbd33d8 100644 --- a/awx/ui/client/src/login/authenticationServices/pendo.service.js +++ b/awx/ui/client/src/login/authenticationServices/pendo.service.js @@ -13,6 +13,7 @@ export default return { setPendoOptions: function (config) { var tower_version = config.version.split('-')[0], + trial = (config.trial) ? config.trial : false, options = { visitor: { id: null, @@ -24,7 +25,7 @@ export default planLevel: config.license_type, planPrice: config.instance_count, creationDate: config.license_date, - trial: config.trial, + trial: trial, tower_version: tower_version, ansible_version: config.ansible_version }