Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

The collector object takes your API key pair as an access key and secret key value, as we configured previously. This will allow it to communicate directly with the simple analytics collector configured by BlinkMobile, for your project. It will also take the URL of the analytics service you wish to communicate with. (Again, this will be the URL we set up in the previous step)


// Initialise the Analytics collector object

const collector = new Analytics({
  accessKey: ANALYTICS_ACCESS_KEY,
  secretKey: ANALYTICS_SECRET_KEY,
  origin: ANALYTICS_URL
})


We set up our collector by initialising a new Analytics object, and passing it the values we configured in the previous step. This custom collector will now be able to communicate directly with the collector in your dashboard, via the access key and secret key.


Next up, we'll look at how you format and log a custom event.

Next Step

Formatting and Logging Events

  • No labels