activecampaign_v3
v1.0.6
Published
Active Campaign Node.js Wrapper (api version 3)
Downloads
6
Maintainers
Readme
Active Campaign Node.js Wrapper
Example usage
var Connector = require("activecampaign_v3");
const actId = "";
const eventKey = "";
const apiKey = "";
const apiUrl = "https://example.api-us1.com";
const ActiveCamp = new Connector(actId, eventKey, apiKey, apiUrl);
ActiveCamp.addContact({ email: "[email protected]", first_name: "bla", last_name: "bla", phone: "+1123456789" }); // add or update contact
ActiveCamp.trackEvent("Signup", "Success", "[email protected]"); //User and Singup event must be created first
ActiveCamp.trackSite("", { url: encodeURIComponent("https://example.com/visited"), referrer: encodeURIComponent("https://example.com/base_url") }, "[email protected]");
Find your credentials
actId (Account ID):
Go to Setting --> Tracking --> Whitelist and Install Code
vgo('setAccount', 'YOUR ACCOUNT ID');
vgo('setTrackByDefault', true);
vgo('process');
eventKey
- Go to Setting --> Tracking --> Event Tracking
- Enable event tracking and get your eventKey Id.
apiKey & apiUrl
- Go to Setting --> Developer --> API Access
- https://example.api-us1.com (without trailing slash)
Notes
- For site tracking, must whitelist your domain first.
- For event tracking, must create Event name from dashboard
- User email must be added first as contact in order to track them. (use addContact api)
- Keep your apiKey secret, Don't to expose it publicly in client-side code