Skip to content

Repository files navigation

npm (scoped)

Usage

Get the latest version of the SDK on npm here.

Configure the SDK before doing any tracking.

EF.configure({
    // You only need to set the tracking domain you want to use
    tracking_domain: 'https://<tracking-domain>.com',
})

If using the NPM module, the Everflow SDK instance is exported as default.

const EverflowSDK = require('@everflow/everflow-sdk');

EverflowSDK.configure({
    // You only need to set the tracking domain you want to use
    tracking_domain: 'https://<tracking-domain>.com',
})

Usage directives and examples can be found on our developer hub

Running locally

To test the SDK locally:

  1. Switch the tracking script to HTTPS. In the Go repo, open pkg/event/handler/script.go and change the scheme:
   // before
   scheme := "http"
   // after
   scheme := "https"
  1. Create an index.html file with the tracking script found on the offer, in the Tracking card:
   <!DOCTYPE html>
   <html>
   <body>
       <!-- paste the script from the offer's Tracking card here -->
       <h1>My First Heading</h1>
       <p>My first paragraph.</p>
   </body>
   </html>
  1. Serve the file over HTTP:
   python3 -m http.server 9001
  1. Fire a click by opening the page with the offer and affiliate IDs:
   http://127.0.0.1:9001/index.html?oid=1&affid=7

About

Everflow's javascript SDK

Topics

Resources

Stars

8 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages