Setting Up Configuration
- Aaron Roworth
- Sam Stephens (Unlicensed)
Owned by Aaron Roworth
First off, you'll need to require in the SDK to your script.Â
//Require in the JavaScript SDK const Analytics = require('@blinkmobile/analytics-sdk')
Next, you should continue with setting up global variables for your Access key and Secret Key, as well as the URL of the Analytics Service (Here we'll just be using the URL to the BlinkMobile Simple Analytics Service:Â https://analytics.blinkm.io)
// Set your keys and Simple Analytics service URL const ANALYTICS_ACCESS_KEY = 'my-api-project' const ANALYTICS_SECRET_KEY = '887659807=3124hjkgf987hjgf77t876t876g' const ANALYTICS_URL = 'https://analytics.blinkm.io'
This will allow you to quickly reference these throughout your script, rather than hardcoding each value.Â
Next, we'll show you how to initialise your custom collector.