
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@daisycon/tracking
Advanced tools
yarn add @daisycon/tracking
npm install @daisycon/tracking
Add the following piece of code to the root of your app so that it loads on every page and stores any received dci.
import {TrackingService} from '@daisycon/tracking';
new TrackingService()
.storeData();
To register a lead or sale, you can use any of the examples below.
import {CurrencyEnum, Part, SuccessInterface, TrackingService, Transaction} from '@daisycon/tracking';
const campaignId: number = 475;
const segment: string = 'lt45.net';
const transaction: Transaction = new Transaction({
campaignId: campaignId,
transactionId: 'AB374782388282',
}).addPart(new Part({
amount: 125,
revenue: 250,
currency: CurrencyEnum.EUR,
externalDescription: 'Transaction for Campaign',
}));
try {
const successResponse: SuccessInterface = await new TrackingService(segment)
.registerTransaction(transaction);
console.log('successResponse', successResponse);
} catch (errorResponse: any) {
console.log('errorResponse', errorResponse);
}
import {CurrencyEnum, Part, SuccessInterface, TrackingService, Transaction} from '@daisycon/tracking';
const campaignId: number = 475;
const segment: string = 'lt45.net';
const transaction: Transaction = new Transaction({
campaignId: campaignId,
transactionId: 'AB374782388282',
}).addPart(new Part({
amount: 125,
revenue: 250,
currency: CurrencyEnum.EUR,
externalDescription: 'Transaction for Campaign',
}));
new TrackingService(segment)
.registerTransaction(transaction)
.then((successResponse: SuccessInterface) => console.log('successResponse', successResponse))
.catch((errorResponse: any) => console.log('errorResponse', errorResponse));
import {CurrencyEnum, Part, SuccessInterface, TrackingService, Transaction} from '@daisycon/tracking';
const campaignId: number = 475;
const segment: string = 'lt45.net';
const myData: any = {
currencyCode: 'EUR',
transactionId: '1234Acef',
products: [
{name: 'test', price: 25.01},
{name: 'test 2', price: 2.95},
]
};
const transaction: Transaction = new Transaction({
campaignId: campaignId,
transactionId: myData.transactionId,
parts: myData.products.map((product: any) => {
return new Part({
amount: product.price,
revenue: product.price,
currency: <CurrencyEnum>myData.currencyCode,
externalDescription: product.name,
});
})
});
new TrackingService(segment)
.registerTransaction(transaction)
.then((successResponse: SuccessInterface) => console.log('successResponse', successResponse))
.catch((errorResponse: any) => console.log('errorResponse', errorResponse));
Add the following piece of code to the root of your app so that it loads on every page and stores any received dci.
const daisycon = require('@daisycon/tracking');
new daisycon.TrackingService()
.storeData();
const daisycon = require('@daisycon/tracking');
const campaignId: number = 475;
const segment: string = 'lt45.net';
const transaction: daisycon.Transaction = new daisycon.Transaction({
campaignId: campaignId,
transactionId: 'AB374782388282',
}).addPart(new daisycon.Part({
amount: 125,
revenue: 250,
currency: daisycon.CurrencyEnum.EUR,
externalDescription: 'Transaction for Campaign',
}));
try {
const successResponse: SuccessInterface = await new daisycon.TrackingService(segment)
.registerTransaction(transaction);
console.log('successResponse', successResponse);
} catch (errorResponse: any) {
console.log('errorResponse', errorResponse);
}
Add the following piece of code to the root of your app so that it loads on every page and stores any received dci.
<script src="/path/to/build/daisycon-bundle.min.js"
new daisycon()
.storeData();
const campaignId: number = 475;
const segment: string = 'lt45.net';
try {
const successResponse = await new daisycon(segment)
.registerTransaction({
campaignId: campaignId,
transactionId: 'AB374782388282',
parts: [{
amount: 125,
revenue: 250,
currency: daisycon.CurrencyEnum.EUR,
externalDescription: 'Transaction for Campaign',
}]
});
console.log('successResponse', successResponse);
} catch (errorResponse) {
console.log('errorResponse', errorResponse);
}
FAQs
Daisycon JS tracking
The npm package @daisycon/tracking receives a total of 31 weekly downloads. As such, @daisycon/tracking popularity was classified as not popular.
We found that @daisycon/tracking demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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 researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.