1.0.5 • Published 2 years ago
goaffpro-client v1.0.5
goaffpro-client
Javascript library to implement goaffpro affiliate marketing system in website storefront
Installation
npm install goaffpro-client
Usage
import { init, trackPageView, trackConversion } from "goaffpro-client";
// ...
// use your public token from Settings -> Advanced Settings tab -> Access Tokens section
// to initialize the SDK
init("x-goaffpro-public-token")
trackPageView() // optional method to call on screen change. To increment the page view counter for the affiliates
// after the customer places the order, call the following to track the conversion
trackConversion({
number:'#1001',
total:500
})
// for complete order schema of trackConversion method, see
// https://github.com/anujtenani/goaffpro/wiki/Custom-Integration-advanced-guide#extended-order-schema-for-conversion-tracking