PhoenixReplay.Recording.Traffic (PhoenixReplay v0.6.2)

Copy Markdown View Source

Where a visit came from, as Google Analytics tells it:

  • :source — the landing's utm_source, else the host of the site that referred it, else "(direct)"
  • :medium — its utm_medium, else "referral" when a site referred it, else "(none)"
  • :campaign — its utm_campaign, or nil

All are nil when the visit's landing was not kept, without PhoenixReplay.Plug and the :client config. See PhoenixReplay.Recording.Client.traffic/1.

Summary

Functions

Reads a source saved before 0.6: "google / cpc / spring", or a lone referrer host or utm_source.

Types

t()

@type t() :: %PhoenixReplay.Recording.Traffic{
  campaign: String.t() | nil,
  medium: String.t() | nil,
  source: String.t() | nil
}

Functions

from_legacy(source)

@spec from_legacy(String.t()) :: t()

Reads a source saved before 0.6: "google / cpc / spring", or a lone referrer host or utm_source.