0.0.252 • Published 2 years ago

@swishjam/swishjam v0.0.252

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Swishjam

Swishjam Instrumentation

A Light-weight javascript tool to capture of core web vitals, page load waterfalls, & more.

Installing with NPM

npm install @swishjam/swishjam

Initialize Swishjam

import { Swishjam } from '@swishjam/swishjam'
Swishjam.init({
  reportingUrl: 'https://example.com/api/swishjam-consumer', // Update to your consumer endpoint or one provided to you by useSwishjam.com
  publicApiKey: 'some-unique-identifier' // this associates your event data with the environment
})

Full Config Settings

Swishjam.init({
  reportingUrl: 'https://yourwebsite.com/api/swishjam-consumer',
  publicApiKey: 'some-unique-identifier', // this associates your event data with the environment
  shouldCapturePerformanceEntries: true, // default is true
  performanceEntryTypesToCapture: ["paint", "longtask", "navigation", "resource", "largest-contentful-paint", "first-input", "layout-shift"], // default is full list
  mockApiCalls: false, // default false
  maxNumEventsInMemory: 25, // default 25
  reportAfterIdleTimeMs: 10_000, // default 10_000
  sampleRate: 1.0, // default 1.0
  includeSwishjamResourcesEntries: false // default false
})

Contributing

git clone git@github.com:swishjam/swishjam.git 
cd swishjam
# For contributing to Swishjam instrumentation
cd instrumentation
npm install
# **Node v16 or higher is required**
  • Send us a PR, github issue, or email at founders@tagsafe.io

Authors

License

ISC License

0.0.252

2 years ago

0.0.251

2 years ago

0.0.249

2 years ago

0.0.248

2 years ago

0.0.247

2 years ago

0.0.246

2 years ago

0.0.250

2 years ago

0.0.243

2 years ago

0.0.241

2 years ago

0.0.242

2 years ago

0.0.24

2 years ago

0.0.21

2 years ago

0.0.2

2 years ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.11

2 years ago

0.0.1

2 years ago

1.0.0

2 years ago