From 6b66558bcca58e9e76d0da0c1c10fa17c26ea67e Mon Sep 17 00:00:00 2001 From: prabrishac Date: Thu, 3 Sep 2020 23:25:24 +0530 Subject: [PATCH] bug fix --- integrations/TVSquared/browser.js | 16 +++++----------- integrations/TVSquared/index.js | 4 ++-- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/integrations/TVSquared/browser.js b/integrations/TVSquared/browser.js index 26ae6d76d2..db94117a14 100644 --- a/integrations/TVSquared/browser.js +++ b/integrations/TVSquared/browser.js @@ -18,14 +18,8 @@ class TVSquared { let url = document.location.protocol === "https:" ? "https://" : "http://"; url += `collector-${this.clientId}.tvsquared.com/`; window._tvq.push(["setSiteId", this.brandId]); - window._tvq.push(["setTrackerUrl", `&${url}tv2track.php`]); + window._tvq.push(["setTrackerUrl", `${url}tv2track.php`]); ScriptLoader("TVSquared-integration", `${url}tv2track.js`); - - window._tvq.push([ - () => { - this.deleteCustomVariable(5, "page"); - }, - ]); } isLoaded = () => { @@ -87,19 +81,19 @@ class TVSquared { } } window._tvq.push([ - () => { + function () { this.setCustomVariable(5, "session", JSON.stringify(session), "visit"); }, ]); if (event.toUpperCase() !== "RESPONSE") { window._tvq.push([ - () => { + function () { this.setCustomVariable(5, event, JSON.stringify(action), "page"); }, ]); window._tvq.push(["trackPageView"]); } - } + }; formatRevenue = (revenue) => { let rev = revenue; @@ -107,4 +101,4 @@ class TVSquared { return rev; }; } -export { TVSquared }; +export default TVSquared; diff --git a/integrations/TVSquared/index.js b/integrations/TVSquared/index.js index f85fe37877..5af5065035 100644 --- a/integrations/TVSquared/index.js +++ b/integrations/TVSquared/index.js @@ -1,3 +1,3 @@ -import { TVSquared } from "./browser"; +import TVSquared from "./browser"; -export default TVSquared; \ No newline at end of file +export default TVSquared;