New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@partnerground/stats-tracker

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@partnerground/stats-tracker

Track statistical information for PartnerGround.com

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

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');

// Client side only
tracker.pageview({
    linkVisitLogSessionId, // Required. Identifies the visit session. 
});

// Client or server side
tracker.addToCart({
    linkVisitLogSessionId, // Required. Identifies the visit session. 
    amountCents,    // Required. Value is in cents. $1 = 100. Used for stats to count purchase amounts.
    itemCustomGroup,// Required. Item group, same as you send to create the reward. Used for stats.
    itemQuantity,   // Required. Used for stats to count sales count.
});

// Client or server side
tracker.removeFromCart({
    linkVisitLogSessionId, // Required. Identifies the visit session. 
    amountCents,    // Required. Value is in cents. $1 = 100. Used for stats to count purchase amounts.
    itemCustomGroup,// Required. Item group, same as you send to create the reward. Used for stats.
    itemQuantity,   // Required. Used for stats to count sales count.
});

// Client or server side
tracker.purchase({
    linkVisitLogSessionId, // Required. Identifies the visit session. 
    amountCents,    // Required. Value is in cents. $1 = 100. Used for stats to count purchase amounts.
    itemCustomGroup,// Required. Item group, same as you send to create the reward. Used for stats.
    itemQuantity,   // Required. Used for stats to count sales count.
});

// Client or server side
tracker.refund({
    linkVisitLogSessionId, // Required. Identifies the visit session. 
    amountCents,    // Required. Value is in cents. $1 = 100. Used for stats to count purchase amounts.
    itemCustomGroup,// Required. Item group, same as you send to create the reward. Used for stats.
    itemQuantity,   // Required. Used for stats to count sales count.
});

Keywords

FAQs

Package last updated on 28 Mar 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc