Evefan SDK to manage events and query information.
Install the SDK using npm:
npm install @evefan/sdk-js
Creates a new instance of the Evefan SDK.
evefanHost
: The Host URL of the Evefan workerwriteKey
: Your Evefan write key
Executes a SQL query against your Evefan data.
sqlQuery
: SQL query string
Returns a Promise that resolves with the query results.
Note: Our module is an ESM module, so you need to use import
instead of require
and in your package.json
you need to set "type": "module"
Here's a standalone code snippet you can use as a starting point:
import Evefan from "@evefan/sdk-js";
const ef = new Evefan({ evefanHost, writeKey });
// Track Data
ef.track({
userId: "019mr8mf4r",
event: "Item Purchased",
properties: {
revenue: 39.95,
shippingMethod: "2-day",
},
});
// Query Data
const result = await ef.query("SELECT * FROM evefan limit 5;");
MIT
For issues and feature requests, please open an issue on GitHub.