Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
prabrishac authored and arnab-p committed Sep 10, 2020
1 parent e03e816 commit 6b66558
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
16 changes: 5 additions & 11 deletions integrations/TVSquared/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down Expand Up @@ -87,24 +81,24 @@ 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;
rev = parseFloat(rev.toString().replace(/^[^\d.]*/, ""));
return rev;
};
}
export { TVSquared };
export default TVSquared;
4 changes: 2 additions & 2 deletions integrations/TVSquared/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { TVSquared } from "./browser";
import TVSquared from "./browser";

export default TVSquared;
export default TVSquared;

0 comments on commit 6b66558

Please sign in to comment.