
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@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,107 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 0 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
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
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.