This is NPM module which exposes methods for easier integration with PartnerGround.com.
It allows to track statistical information for affiliate links.
https://partnerground.com/
Usage overview
When PartnerGround redirects user to your site URL will have added query parameter _partnerground_vls
Application must save this _partnerground_vls
and pass it in to track methods on client or server side as linkVisitLogSessionId
.
Pageview method must always be used on client side.
Methods to track stats
const tracker = require('@partnerground/stats-tracker');
tracker.pageview({
linkVisitLogSessionId,
});
tracker.addToCart({
linkVisitLogSessionId,
amountCents,
itemCustomGroup,
itemQuantity,
});
tracker.removeFromCart({
linkVisitLogSessionId,
amountCents,
itemCustomGroup,
itemQuantity,
});
tracker.purchase({
linkVisitLogSessionId,
amountCents,
itemCustomGroup,
itemQuantity,
});
tracker.refund({
linkVisitLogSessionId,
amountCents,
itemCustomGroup,
itemQuantity,
});