
Security Fundamentals
Obfuscation 101: Unmasking the Tricks Behind Malicious Code
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
@blinkmobile/analytics-sdk
Advanced tools
The javascript SDK for BlinkMobile analytics. Works in the browser (with a build step) and on the server.
The javascript SDK for sending custom events to the BlinkMobile Simple Analytics service.
If you are a BlinkMobile customer, you can access your analytics through the BlinkMobile Analytics Console or your custom installation if you have one. For more information, please contact support@blinkmobile.com.au.
Please Note: This is only just out of alpha release. It is currently being used by a number of BlinkMobile NodeJS projects. It has not yet been tested on client-side projects. If you have a special requirement, please request a feature.
npm install --save @blinkmobile/analytics-sdk
You will need an Access Key and a Secret Key for the Simple Analytics service. Please contact support@blinkmobile.com.au for keys.
Start by setting up your configuration and initialising a "collector".
// [1] Require in the SDK
const Analytics = require('@blinkmobile/analytics-sdk')
// [2] 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'
// [3] Initialise the Analytics collector object
const collector = new Analytics({
accessKey: ANALYTICS_ACCESS_KEY,
secretKey: ANALYTICS_SECRET_KEY,
origin: ANALYTICS_URL
})
Your events must be an object but they can have any form you like. The events below are based on Google Analytics events.
To send a single custom event with the logEvent()
method:
// Format your event
const formattedEvent = {
category: "Videos",
action: "Start",
label: "HowTo",
value: Date.now()
}
// Log your event
collector.logEvent("Server CLI Request", formattedEvent)
.then((analyticsEvent) => {
// The logEvent() method returns a Promise
// that resolves to the event
// sent to the analytics service
console.log(analyticsEvent)
})
.catch((err) => {
throw Error(err)
})
To send multiple events with the logEvents()
method:
// Format your events into an array
const formattedEvents =
[
{
category: "Videos",
action: "Start",
label: "HowTo",
value: 1497509263823
},
{
category: "Videos",
action: "Stop",
label: "HowTo",
value: 1497509350209
}
]
// Log your events
collector.logEvents("Server CLI Request", formattedEvents)
.then((analyticsEvent) => {
// The logEvents() method returns a Promise
// that resolves to whatever was
// returned from the Simple Analytics service,
// currently the array of events that
// was sent to Simple Analytics
console.log(analyticsEvent)
})
.catch((err) => {
throw Error(err)
})
Contributions on GitHub are welcome. Please fork the repo and make a pull request.
If you have a problem, please make an issue and we'll give it our full attention.
1.0.0-beta.4 2018-05-02
FAQs
The javascript SDK for BlinkMobile analytics. Works in the browser (with a build step) and on the server.
The npm package @blinkmobile/analytics-sdk receives a total of 1 weekly downloads. As such, @blinkmobile/analytics-sdk popularity was classified as not popular.
We found that @blinkmobile/analytics-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.
Security News
Biome's v2.0 beta introduces custom plugins, domain-specific linting, and type-aware rules while laying groundwork for HTML support and embedded language features in 2025.