Skip to content

Commit

Permalink
fix(FEC-10161): add kava analytics url from server response (#82)
Browse files Browse the repository at this point in the history
Issue: kava reports to production env instead QA
Solution: add service protocol for default only.
  • Loading branch information
Yuvalke authored Sep 2, 2020
1 parent d9fdba5 commit 2574aa4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/kava.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {ErrorPosition, KavaModel, SoundMode, TabMode, ScreenMode} from './kava-m
const {Error: PKError, FakeEvent, Utils} = core;
const DIVIDER: number = 1024;
const TEXT_TYPE: string = 'TEXT';

/**
* Kaltura Advanced Analytics plugin.
* @class Kava
Expand Down Expand Up @@ -49,7 +48,7 @@ class Kava extends BasePlugin {
* @memberof Kava
*/
static defaultConfig: Object = {
serviceUrl: '//analytics.kaltura.com/api_v3/index.php',
serviceUrl: `${Utils.Http.protocol}//analytics.kaltura.com/api_v3/index.php`,
viewEventCountdown: 10,
resetSessionCountdown: 30,
dvrThreshold: 120,
Expand Down Expand Up @@ -207,7 +206,7 @@ class Kava extends BasePlugin {
*/
sendAnalytics(model: Object): Promise<*> {
return new Promise((resolve, reject) => {
OVPAnalyticsService.trackEvent(Utils.Http.protocol + this.config.serviceUrl, model)
OVPAnalyticsService.trackEvent(this.config.serviceUrl, model)
.doHttpRequest()
.then(
response => {
Expand Down

0 comments on commit 2574aa4

Please sign in to comment.