Skip to content

Commit

Permalink
honour use_test_ga env to send analytics, getgauge/gauge#1277
Browse files Browse the repository at this point in the history
  • Loading branch information
sriv committed Dec 20, 2018
1 parent 644bdc4 commit 19bd84f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ var fs = require("fs");
var path = require("path");
var version = require("../package.json").version;
var os = require("os");
const gaTestTrackingID = "UA-100778536-1",
gaTrackingID = "UA-54838477-1";

var isCI = function () {
var env = process.env;
Expand All @@ -24,6 +26,7 @@ var getPostData = function (medium, cid) {
return "";
}
var labels = pi.dependencies.taiko && "taiko," + os.platform() || os.platform();
var gaID = process.env.use_test_ga.toLowerCase() === "true" ? gaTestTrackingID : gaTrackingID;
return qs.stringify({
aip: "1",
an: "Gauge Core",
Expand All @@ -36,7 +39,7 @@ var getPostData = function (medium, cid) {
el: labels,
t: "event",
v: "1",
tid: "UA-54838477-1"
tid: gaID
});
};

Expand Down

0 comments on commit 19bd84f

Please sign in to comment.