now sending app name

This commit is contained in:
Philipp Kunz 2017-04-17 17:20:56 +02:00
parent 80f9201ff0
commit 883b0a4c28
7 changed files with 16 additions and 8 deletions

3
dist/index.js vendored
View File

@ -1,4 +1,5 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var smartanalytics_classes_analyticsaccount_1 = require("./smartanalytics.classes.analyticsaccount"); var smartanalytics_classes_analyticsaccount_1 = require("./smartanalytics.classes.analyticsaccount");
exports.AnalyticsAccount = smartanalytics_classes_analyticsaccount_1.AnalyticsAccount; exports.AnalyticsAccount = smartanalytics_classes_analyticsaccount_1.AnalyticsAccount;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEscUdBQTRFO0FBQW5FLHFFQUFBLGdCQUFnQixDQUFBIn0= //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHFHQUE0RTtBQUFuRSxxRUFBQSxnQkFBZ0IsQ0FBQSJ9

View File

@ -1,4 +1,5 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const send = require("./smartanalytics.send"); const send = require("./smartanalytics.send");
class AnalyticsAccount { class AnalyticsAccount {
constructor(appNameArg, trackingIdArg) { constructor(appNameArg, trackingIdArg) {
@ -10,4 +11,4 @@ class AnalyticsAccount {
} }
} }
exports.AnalyticsAccount = AnalyticsAccount; exports.AnalyticsAccount = AnalyticsAccount;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhbmFseXRpY3MuY2xhc3Nlcy5hbmFse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ksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLFVBQVUsRUFBRSxJQUFJLENBQUMsT0FBTyxFQUFFLGdCQUFnQixFQUFFLGNBQWMsRUFBRSxhQUFhLENBQUMsQ0FBQTtJQUM1RixDQUFDO0NBQ0Y7QUFYRCw0Q0FXQyJ9

View File

@ -1,7 +1,8 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("typings-global"); require("typings-global");
const smartrequest = require("smartrequest"); const smartrequest = require("smartrequest");
exports.smartrequest = smartrequest; exports.smartrequest = smartrequest;
const smartq = require("smartq"); const smartq = require("smartq");
exports.smartq = smartq; exports.smartq = smartq;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhbmFseXRpY3MucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0YW5hbHl0aWNzLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBCQUF1QjtBQUN2Qiw2Q0FBNEM7QUFJeEMsb0NBQVk7QUFIaEIsaUNBQWdDO0FBSTVCLHdCQUFNIn0= //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhbmFseXRpY3MucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0YW5hbHl0aWNzLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwwQkFBdUI7QUFDdkIsNkNBQTRDO0FBSXhDLG9DQUFZO0FBSGhCLGlDQUFnQztBQUk1Qix3QkFBTSJ9

View File

@ -7,12 +7,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next()); step((generator = generator.apply(thisArg, _arguments || [])).next());
}); });
}; };
Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./smartanalytics.plugins"); const plugins = require("./smartanalytics.plugins");
exports.event = (trackingIdArg, appNameArg, eventCategoryArg, eventActionArg, eventLabelArg = 'null') => { exports.event = (trackingIdArg, appNameArg, eventCategoryArg, eventActionArg, eventLabelArg = 'null') => {
let payload = 'v=1' + let payload = 'v=1' +
`&tid=${trackingIdArg}` + `&tid=${trackingIdArg}` +
'&cid=555' + '&cid=555' +
'&aip=1' + '&aip=1' +
`&an=${appNameArg}` +
'&t=event' + '&t=event' +
`&ec=${eventCategoryArg}` + `&ec=${eventCategoryArg}` +
`&ea=${eventActionArg}` + `&ea=${eventActionArg}` +
@ -26,4 +28,4 @@ let send = (requestBodyArg) => __awaiter(this, void 0, void 0, function* () {
requestBody: requestBodyArg requestBody: requestBodyArg
}); });
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhbmFseXRpY3Muc2VuZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0YW5hbHl0aWNzLnNlbmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUEsb0RBQW1EO0FBRXhDLFFBQUEsS0FBSyxHQUFHLENBQUMsYUFBcUIsRUFBRSxVQUFrQixFQUFFLGdCQUF3QixFQUFFLGNBQWMsRUFBRSxnQkFBd0IsTUFBTTtJQUNuSSxJQUFJLE9BQU8sR0FBVyxLQUFLO1FBQ3ZCLFFBQVEsYUFBYSxFQUFFO1FBQ3ZCLFVBQVU7UUFDVixRQUFRO1FBQ1IsVUFBVTtRQUNWLE9BQU8sZ0JBQWdCLEVBQUU7UUFDekIsT0FBTyxjQUFjLEVBQUU7UUFDdkIsT0FBTyxhQUFhLEVBQUU7UUFDdEIsU0FBUztRQUNULE9BQU8sYUFBYSxFQUFFLENBQUE7SUFDMUIsSUFBSSxDQUFDLE9BQU8sQ0FBQyxD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QUEsQ0FBQSJ9

View File

@ -1,4 +1,7 @@
{ {
"npmts": {
"coverageTreshold": 40
},
"npmci": { "npmci": {
"globalNpmTools": [ "globalNpmTools": [
"npmts" "npmts"

1
test/test.d.ts vendored
View File

@ -1 +0,0 @@
import 'typings-test';

View File

@ -5,10 +5,11 @@ export let event = (trackingIdArg: string, appNameArg: string, eventCategoryArg:
`&tid=${trackingIdArg}` + // the tracking ID `&tid=${trackingIdArg}` + // the tracking ID
'&cid=555' + '&cid=555' +
'&aip=1' + // anonymize the IP '&aip=1' + // anonymize the IP
`&an=${appNameArg}` + // appName
'&t=event' + '&t=event' +
`&ec=${eventCategoryArg}` + `&ec=${eventCategoryArg}` + // event category
`&ea=${eventActionArg}` + `&ea=${eventActionArg}` + // event action
`&el=${eventLabelArg}` + `&el=${eventLabelArg}` + // event label
'&ev=300' + '&ev=300' +
`&an=${eventLabelArg}` `&an=${eventLabelArg}`
send(payload) send(payload)