Categorygithub.com/common-fate/analytics-go
repositorypackage
0.2.0
Repository: https://github.com/common-fate/analytics-go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# README

analytics

This repository contains product analytics as defined in RFD#8.

Events

All events emitted are listed in the below table. Discussion of these is welcomed on RFD#8.

NameEmitted WhenExample Data
cf:groupidentify:deploymentDeployment updated./fixtures/cf-groupidentify-deployment.json
cf:identify:user_infoAccess Request created/updated./fixtures/cf-identify-user-info.json
cf:request.createdAccess Request was created./fixtures/cf-request-created.json
cf:request.reviewedAccess Request was reviewed./fixtures/cf-request-reviewed.json
cf:request.revokedAccess Request was revoked./fixtures/cf-request-revoked.json
cf:rule.archivedAccess Rule was archived./fixtures/cf-rule-archived.json
cf:rule.createdAccess Rule was created./fixtures/cf-rule-created.json
cf:rule.updatedAccess Rule was updated./fixtures/cf-rule-updated.json

Usage

The acore package contains the core analytics client. The client is forked from the PostHog Go client (which itself appears to have been forked from Segment's Go SDK).

The library handles client-side hashing identifiers such as usr_123. We transform usr_123 using a SHA256 hash into usr_-CHh8_rdIqAotcBsP64GKQkfzW2hb1JDJ_6u7q4zom4 prior to events being dispatched. In the library this is controlled by the analytics:"usr" struct tag added to the event.

Adding new events

Check out CONTRIBUTING.md for a how-to guide.

Editing this README

This README is automatically generated from the template in README.tmpl. Edit that rather than this file.