{"repo":"pirsch-analytics/pirsch-js-sdk","free":true,"listed":false,"github":"https://github.com/pirsch-analytics/pirsch-js-sdk","clone":"git clone https://github.com/pirsch-analytics/pirsch-js-sdk.git","description":"JavaScript Client SDK for Pirsch Analytics.","language":"TypeScript","stars":27,"topics":["pirsch","client","sdk","javascript","analytics"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Pirsch JavaScript SDK This is the official JavaScript client SDK for Pirsch. For details, please check out our documentation. Installation Usage Configuration The SDK is configured using the constructor. We recommend using an access key instead of a client ID + secret if you only need write access (sending page views and events), as it saves a roundtrip to the server when refreshing the access token. If you run your server-side integration behind a proxy or load balancer, make sure you correctly configure trustedProxyHeaders . They will be used to extract the real visitor IP for each request. They will be used in the order they are passed into the configuration. Possible values are: \"cf-connecting-ip\", \"x-forwarded-for\", \"forwarded\", \"x-real-ip\" . Server-Side Here is a quick demo on how to use this library in NodeJS: Client-Side Here is how you can do the same in the browser: Tracking Outbound Links and Downloads The Pirsch snippet will, by default, connect event handlers to outbound and download links. To recreate this behavior: Tracking Page Views in SPAs The snippet automatically tracks page views via the History API. To replicate this: FAQ This module export three Clients ( pirsch-sdk , pirsch-sdk/web-api and pirsch-sdk/web ), what are the differences? - pirsch-sdk and pirsch-sdk/web-api are based on the same core logic, and function the same. It can be used to access and sending data via the API. pirsch-sdk/web-api is a version of the Node client that works in the web. Y","default_branch":null,"files":null,"tree":[],"storefront":"/r/pirsch-analytics","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pirsch-analytics/pirsch-js-sdk/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}