Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@amplitude/identify
Advanced tools
Utility functions to build and interact with the Identify API
Utility functions to build and interact with the Identify API with the Node SDK. This is a builder library to help interface with creating Identify events. These events help add user properties to users and devices in your analytics, and do not count towards the event volume.
To use this, create an Identify instance and use the provided functions to set properties, chaining along function calls:
import { Identify } from '@amplitude/identify'
const identify = new Identify();
identify
.set('start_date', 'March 3rd')
.add('num_clicks', 4)
.unset('needs_to_activate')
Then, this can be used with the Node SDK to send an identify call. Because identify calls are special events, there are two different ways to accomplish this:
import Amplitude from '@amplitude/node';
const client = Amplitude.init('YOUR_API_KEY');
// One way to call the identify
client.identify('USER_ID', 'DEVICE_ID', identify);
// Equivalent way to call identify
// Can also modify the identifyEvent directly here
const identifyEvent = identify.identifyUser('USER_ID', 'DEVICE_ID');
client.logEvent(identifyEvent);
This is not compatible with the Amplitude Javascript SDK (amplitude-js
).
This package should not be used with that SDK, and the identify API provided there should not be used with the Node SDK.
There are plans to consolidate these incompatibilities
.
This identify supports the setGroup
function.
Any identify operation calls made on this object will also be treated as a group identify call.
Certain operations will not be transferred to the group properties (see the docs on the Group Identify API to see which properties are supported here).
To not associate a user with the group identify, you can also use the identifyGroup
function to send $groupIdentify
events for a group.
Clear all will clear all user properties from the user and device on all events going forward. Use this carefully and make sure this is something you want to do instead of creating a new user/device id. When clear all is used on the identify builder, all other operations are canceled and no new operations can be added. This is because clear all must be sent as its own identify object.
FAQs
Utility functions to build and interact with the Identify API
We found that @amplitude/identify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 19 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.