
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
@studyportals/datalake-event-tracker
Advanced tools
The datalake event tracker is a package which uses the JS-Tracker to track data to Redshift. The goal of this package is to have a uniform way of tracking events. The tracker enforces naming conventions that will make it possible to automate the creation of dashboards, procedures, and further analytics.
The following commands can be used to setup and run a local environment for developing the modal component. Also, we're using husky
to run unit tests before a git push
is done. This could be by-passed (if absolutely necessary) by running git push --no-verify
.
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm start
# build for production with minification
npm run build
# run unit tests
npm run unit
The "datalake event tracker"(hereby further referred to as "tracker") needs to be constructed with a valid Product as argument. Valid options are available in @studyportals/datalake-event-tracker/src/enums/product .
After constructing a new instance of the datalake event tracker the tracker will collect the JS-Datatracker from the window. After collecting the JS-Datatracker the event 'DatalakeEventTrackerLoaded' is dispatched and window['DatalakeEventTrackerLoaded'] = true; is set. This way you will be able to collect or wait for the tracker.
After initiating the tracker you will be able to track events by using the tracker.TrackStructuredEvents method:
import { Product, Action, Tracker } from "@studyportals/datalake-event-tracker";
const category = Product.BESTFIT_OVERVIEW;
const tracker = new Tracker(category);
const trackingData: object = {
action: Action.CLICK,
label: 'label_example',
property: 'property_example',
value: 420
}
tracker.trackStructuredEvent(trackingData);
The category(product) and action need to exist as an enum. This way we won't have conflicting names or variations. Additions to these enumerations might be done within this repository.
You can import the available product and action enumerations like so:
import { Product } from "@studyportals/datalake-event-tracker";
import { Action } from "@studyportals/datalake-event-tracker";
The following naming convention will be enforced. An error will be thrown when an event is not valid according to the agreed upon convention. category(product): PascalCase action: snake_case label: snake_case property: snake_case value: decimal
The following rule-set can be applied to all the events to track:
FAQs
The supporting package for the JS-Tracker
The npm package @studyportals/datalake-event-tracker receives a total of 1,233 weekly downloads. As such, @studyportals/datalake-event-tracker popularity was classified as popular.
We found that @studyportals/datalake-event-tracker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 24 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
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.