Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
wlrp__conversion-tracker
Advanced tools
<script src="path/to/conversion.js"></script>
<script>
// Minimal setup
var config = {
id: 'GTM-123456'
},
reporter = new ConversionReporter(config);
</script>
This will inject the GTM script with the ID provided and initialize the Reporter object.
// Set manually
reporter.setAmount(10);
reporter.setQuantity(2);
// Or bind to an element that has a `value` property (i.e. input)
reporter.bindAmount(document.getElementById('amountInput'));
reporter.bindQuantity(document.getElementById('quantityInput'));
This will populate the amount
and quantity
fields of your Reporter object. Reports can now be sent using these values. Add a custom revenue calculator to the config if you want anything more complex.
reporter.sendReport();
To use a custom calculator for your revenue reporting, pass a function to the Reporter object's constructor that does the calculations. The function must have 2 params (quantity and amount), and must return an integer.
function calculateCustom(quantity, amount) {
// Only 20% commission from partner sales?
return (quantity*amount)*0.2;
}
var config = {
id: 'GTM-123456'
calculator: calculateCustom
},
reporter = new ConversionReporter(config);
function(quantity, amount) {
return quantity * amount;
}
FAQs
WLRP Conversion tracking library based on Google Tag Manager
The npm package wlrp__conversion-tracker receives a total of 0 weekly downloads. As such, wlrp__conversion-tracker popularity was classified as not popular.
We found that wlrp__conversion-tracker demonstrated a not healthy version release cadence and project activity because the last version was released 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.
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.