2016-11-11 19:27:47 +03:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* In an add-on you can get the UT client ID like this:
|
|
|
|
*
|
|
|
|
* Task.spawn(function*() {
|
|
|
|
* const {Cu} = require("chrome");
|
|
|
|
* Cu.import("resource://gre/modules/ClientID.jsm");
|
|
|
|
* const myClientID = yield ClientID.getClientID();
|
|
|
|
* });
|
|
|
|
*/
|
|
|
|
|
2016-11-24 01:13:30 +03:00
|
|
|
const topic = process.env.PING_CENTRE_TOPIC;
|
2016-11-25 21:41:35 +03:00
|
|
|
const PingCentre = require("ping-centre");
|
2016-11-24 01:13:30 +03:00
|
|
|
const pingClient = new PingCentre(topic, "clientID", "https://onyx_tiles.stage.mozaws.net/v3/links/activity-stream");
|
2016-11-11 19:27:47 +03:00
|
|
|
|
|
|
|
pingClient.sendPing({
|
2016-11-24 01:13:30 +03:00
|
|
|
event_type: "search",
|
2016-11-11 19:27:47 +03:00
|
|
|
value: 3
|
|
|
|
});
|