Skip to main content

Module sources

Module sources 

Source
Expand description

Where a visit came from: the page’s own tags, the referrer, and the channel they add up to.

Structs§

Attribution
Where a visit came from.
Found
A known source, found or made from a host’s shape.
Page
What a page’s URL says: its host, its path, its campaign tags.
Utm
The utm_ tags of a page’s URL.

Functions§

attribute
Where a visit came from. internal_hosts are the site’s own hostnames: a referrer on one of them is navigation within the site, not a source.
decode_uri_component
decodeURIComponent: None where it throws (a broken escape, or bytes that are not UTF-8).
encode_uri_component
encodeURIComponent.
parse_page
What a page’s URL says about the visit.
readable_path
A recorded path as people write it, for showing and exporting: /caf%C3%A9 as /café. Only text is decoded; an encoded slash, space, or other mark that would change the path’s meaning stays as it is.
recorded_path
A path a person wrote, in the form paths are recorded: the path of a pasted URL, with a leading slash, percent-encoded as the browser’s URL parser encodes it, and with a hash route kept, as parse_page keeps it. None when it is not a path or a URL.
source_for_alias
The known source a tag names, such as utm_source=newsletter.
source_for_host
The most specific known source for a host: mail.google.com before google.com. Android apps send their package name as the referrer (com.google.android.gm for Gmail), which is matched the same way. Hosts known only by their shape (click trackers, webmail) come last.
strip_www
The host lower case, without a leading www..