New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@compilorama/staly

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@compilorama/staly

Privacy-first analytics

  • 0.4.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Staly

Privacy-first analytics.

CircleCI Coverage Status

Installation

npm install @compilorama/staly --save

Usage

Staly is based on Plausible by default, but you can optionally use another service. See Adapters section below to learn more.

import Staly from '@compilorama/staly';

const staly = new Staly();
staly.init('glorious.codes');
staly.trackPageview();

To avoid being tracked by any site using Staly, set analytics search param as disabled. Your preference will be set in a cookie and the following visits won't be tracked even without declaring the analytics search param on url.

https://glorious.codes?analytics=disabled

API

init

/*
** @token: String [required]
** @options: Object [optional]
*/

// Domain registered on Plausible
const token = 'compilorama.com';
// Local development is not tracked by default, but you can make it work by
// setting trackLocalhost option as true on initializaton.
const options = { trackLocalhost: true };
const staly = new Staly();

staly.init(token, options);

trackPageview

staly.trackPageview();

Adapters

You can optionally use Staly with the following adapters. Click over one of them to get specific instructions:

Contributing

  1. Install Node. Download the "Recommend for Most Users" version.

  2. Clone the repo:

git clone git@github.com:compilorama/staly.git
  1. Go to the project directory:
cd staly
  1. Install the project dependencies:
npm install
  1. Build the project:
npm run build

Tests

Ensure that all code that you have added is covered with unit tests:

npm run test -- --coverage

Keywords

FAQs

Package last updated on 29 Sep 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc