Documentation
¶
Index ¶
- Variables
- func IsConsentRecorded() (rec bool)
- func LogInvoke(ctx *kong.Context)
- func Printf(format string, a ...interface{}) (n int, err error)
- func Println(a ...interface{}) (n int, err error)
- func PromptForConsent() (c bool, err error)
- func ReadConsent() (c bool, err error)
- func Submit(e Event) (err error)
- func WriteConsent(consent bool) (err error)
- type Event
Constants ¶
This section is empty.
Variables ¶
var ( // HeapBaseURI is the location of Heap API endpoint HeapBaseURI = "https://heapanalytics.com" // HeapAppID identifies what Heap App events are recorded against HeapAppID = "4248790180" // development id, overridden during `make build` // ConsentGiven records whether tracking consent has been given by the user ConsentGiven bool )
Functions ¶
func IsConsentRecorded ¶
func IsConsentRecorded() (rec bool)
IsConsentRecorded returns if valid consent has been recorded for tracking
func Printf ¶
Printf formats according to a format specifier and writes to standard output. Output can be overridden for testing purposes by setting: analytics.out It returns the number of bytes written and any write error encountered.
func Println ¶
Println formats using the default formats for its operands and writes to output. Output can be overridden for testing purposes by setting: analytics.out It returns the number of bytes written and any write error encountered.
func PromptForConsent ¶
PromptForConsent interactively prompts the user for consent
func ReadConsent ¶
ReadConsent finds if consent has been given, either from file or by prompt.
func Submit ¶
Submit submits an analytics event to Section
Behavior is determined by consent:
if consent not given {
prompt for consent
}
if consent == true {
submit analytics
}
func WriteConsent ¶
WriteConsent writes the current consent state to a persistent file