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
To test the SDK locally:
- Switch the tracking script to HTTPS. In the Go repo, open
pkg/event/handler/script.goand change the scheme:
// before
scheme := "http"
// after
scheme := "https"- Create an
index.htmlfile 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>- Serve the file over HTTP:
python3 -m http.server 9001- 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