stats

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package stats counts the use of the demo and NSGo Player in the website's Umami, as pages of the site: the site's own pages are tagged "website", the demo's "demo" and the app's "app". An install carries a random ID kept in the storage, so that one install is one visitor. Builds of nsgo dev and test binaries report nothing, nor an app whose viewer turned it off (Options.On).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Report

func Report(cx *core.Scope, o Options)

Report sends a pageview whenever the page changes, and the heartbeats while the app is in use. Events are made on the graph's goroutine and sent from another, oldest first; one that fails is dropped.

Types

type Options

type Options struct {
	// Tag tells the app apart, as "demo" or "app".
	Tag string
	// Page returns the page shown, its path under the site and its title;
	// a pageview is sent each time it changes. It is read in an effect.
	Page func() (path, title string)
	// On reports whether the viewer leaves the statistics on, checked
	// before each event; nil is always.
	On func() bool
	// Busy reports whether the app is in use though no page changed, as
	// while a video plays; nil is never.
	Busy func() bool
}

Options are what an app reports.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL