
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
atom-node is the official ironSource.atom SDK for Node.JS Javascript runtime
$ npm install atom-node --save
The tracker is used for sending events to Atom based on several conditions
const AtomTracker = require('atom-node').Tracker;
co(function*() {
const params = {
endpoint: "https://track.atom-data.io/", // Optional, Don't change this (unless you have your own DNS CNAME)
auth: "YOUR PRE-SHARED HAMC AUTH KEY", // Can be found in Atom Console
flushInterval: 10, // Optional, Flushing interval in seconds
bulkLen: 1000, // Optional, Max count for events to send
bulkSize: 128, // Optional, Max size of data in Kb
};
let tracker = new AtomTracker(params);
tracker.on('error', (err, data) => {
// Handle Flush errors in here (write to file for example)
console.log(`[TRACKER EXAMPLE] Got Error: ${err} for #${data.data.length} events`);
});
for (let i = 0; i < 10; i++) {
let data = {
id: i
};
try {
yield tracker.track("SOME STREAM", data)
} catch (err) {
console.log(`[TRACKER EXAMPLE] track() method Error: ${err}`);
}
}
// For sending events immediately use
tracker.flush();
});
The methods: track() and flush() are decoupled and independent of each other.
track() method behaviour:
Tracks data to backlog, returns a Promise which will be resolved only when data is tracked to backlog.
The function rejects the Promise in 3 cases:
trackingTimeout has been reached.track() by default is blocking, but you can set it as non-blocking.
Note: blocking means that it will block new track() calls and not the whole event loop.
If block is true (the default) => block if necessary until a free slot is available.
If block is false and timeout is a positive number: blocks at most timeout seconds (10 seconds by default)
and emit and error event if no free slot was available within that time.
All track() errors need to be handled by a regular try-catch block.
All flush() errors are handled by error event.
See here for all usage examples
Error event is mandatory and you must listen to it.
tracker.on("error", (err, data) => console.log("[EXAMPLE2-GENERATOR] onError function:", err, data));
Except for 'error', the tracker emits this optional events:
tracker.on("stop", _ => console.log("[EXAMPLE2-GENERATOR] tracker stopped"));
tracker.on("retry", _ => console.log("[EXAMPLE2-GENERATOR] tracker emitted 'retry' event"));
tracker.on("empty", _ => console.log("[EXAMPLE2-GENERATOR] tracker emitted 'empty' event"));
The tracker is using a simple in memory storage for its backlog
You can replace it with a custom backlog using the same interface
const AtomTracker = require('atom-node').Tracker;
const params = {
backlog: YourCustomBacklogClass()
}
let tracker = new AtomTracker(params);
The tracker is using a simple logger based on console, you can replace it with your own (bunyan for example)
const AtomTracker = require('atom-node').Tracker;
const params = {
logger: myLoggerModule
}
let tracker = new AtomTracker(params);
The Low Level SDK has 2 methods:
'use strict';
const AtomReporter = require('atom-node').ISAtom;
const options = {
endpoint: "https://track.atom-data.io/",
auth: "YOUR_API_KEY"
};
let atom = new AtomReporter(options);
let params = {
stream: "STREAM_NAME", // Your target stream name
data: JSON.stringify({name: "iron", last_name: "Source"}), // Object / Stringified Json
}
// With co (POST):
co(function*() {
try {
let res = yield atom.putEvent(params);
console.log(`[Example PutEvent POST] success: ${res.message} ${res.status}`);
} catch (err) {
console.log(`[Example PutEvent POST] failure: ${err.message} ${err.status}`);
}
});
// With Promises
params.method = 'POST';
atom.putEvent(params).then(function (res) {
console.log(`[Example PutEvent POST] success: ${res.message} ${res.status}`);
}).catch(function (err) {
console.log(`[Example PutEvent POST] failure: ${err.message} ${err.status}`);
});
// PutEvents (batch):
let batchPayload = {
stream: "STREAM_NAME", // Your target stream name
data: [{name: "iron", last_name: "Beast"},
{name: "iron2", last_name: "Beast2"}], // Array with Json / Stringified Json
};
atom.putEvents(batchPayload).then(function (res) {
console.log(`[Example PutEvents POST] success: ${res.message} ${res.status}`);
}, function (err) {
console.log(`[Example PutEvents POST] failure: ${err.message} ${err.status}`);
});
You can use our example for sending data to Atom.
node example/example.js -h
Usage: example [options]
Options:
-h, --help output usage information
-V, --version output the version number
-p, --putevent Run the putEvent examples
-P, --putevents Run the putEvents examples
-H, --health run the health check example
-t, --tracker run the tracker example
-a, --all Run all of the examples
FAQs
IronSource Atom NodeJS SDK
We found that atom-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.