
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
stream-analytics
Advanced tools
# via npm
$ npm install stream-analytics
Or load the library from our CDN:
<script src="//d2j1fszo1axgmp.cloudfront.net/1.3.0/stream-analytics.min.js" type="text/javascript"></script>
var client = new StreamAnalytics({
projectId: "YOUR_PROJECT_ID",
writeKey: "YOUR_WRITE_KEY"
});
client.setUser('user:Thierry');
Every activity (eg. messages) shown to the user should be tracked as an impression.
var impression = {
activityIds: ['message:34349698', 'message:34349699'],
feedId: 'user:ChartMill'
};
// track impression for two messages presented to the user
client.trackImpression(impression);
Every meaningful user interactions should be tracked with content (activity_id) and source (sourceFeedId) information and provide a label and a score (the score) for the engagement. score is a signed integer. Positive values boost source and content for the user that trigger the engagement, negative values work as a discount for the same context. The value of the score can be used to differentiate engagements according to their importants (eg. sharing a message is probably more important than just clicking it).
engagement = {...}
// Sends one engagement event to the APIs
client.trackEngagement(engagement);
// Click on a message
var engagement = {
label: 'click',
score: 10,
activityId: 'message:34349698',
feedId: 'user:ChartMill',
};
client.trackEngagement(engagement);
// Share message
var engagement = {
label: 'share',
score: 100,
activityId: 'message:34349698',
feedId: 'user:ChartMill',
};
client.trackEngagement(engagement);
this allows for storing extra information about the current user such as public profiles
var userData = {
twitterId: '15875029',
facebookId: '784785430'
};
client.updateUserData(userData);
FAQs
Analytics JS client for GetStream.io.
The npm package stream-analytics receives a total of 3,689 weekly downloads. As such, stream-analytics popularity was classified as popular.
We found that stream-analytics demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 13 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.