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.
better-attribution
Advanced tools
Allows you to easily tracks & store first/last touch attribution in cookies to enable multi-touch attribution. Tracks UTMs, Facebook, Google Ads, and more automatically.
import { betterAttribution, DefaultQueryParams } from "better-attribution";
const attr = betterAttribution();
// Stores the current URL query params and referrer in a cross site cookie
attr.storeAttributionValues();
// JSON from the latest visit
const lastParams = attr.getLastTouch();
console.log(lastParams); // {referrer: 'facebook.com', fbclid: 'abc-123'}
// JSON from the first visit
const firstParams = attr.getFirstTouch();
console.log(firstParams); // {utm_term: 'first-visit-term', referrer: 'google.com'}
Features:
Default list of tracked query params (you can override this in the setup function):
Customization:
// All arguments are optional
const attr = betterAttribution({
// allows tracking of additional (or fewer) query params
queryParams: [...DefaultQueryParams, "custom_known_query_param"] as const,
// allows prefixing the cookie w a custom string
cookiePrefix: "custom_prefix",
// allows setting the cookie w a custom domain
domain: "example_2.com",
});
attr.getFirstTouch().custom_known_query_param // undefined | string
npm i better-attribution
MIT
FAQs
Allows you to easily tracks & store first/last touch attribution in cookies to enable multi-touch attribution. Tracks UTMs, Facebook, Google Ads, and more automatically.
We found that better-attribution demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.