Karta.Tracking.TrackingHost (Karta v1.0.0)

A sending domain's own tracking host, such as click.example.com for example.com: a name under the domain whose CNAME record points to Karta's tracking host (Karta.Tracking.Hosts).

name is the whole host name in lower-case ASCII form, without a final dot. A domain has at most one tracking host, and a name belongs to one domain in the instance.

The last DNS check (Karta.Tracking.Hosts.check/2) is kept:

  • check_result - :ok (the CNAME points to Karta), :missing (no CNAME record at the name), :mismatch (a CNAME to another name, kept in found) or :failed (the lookup failed; found says why); nil before the first check;
  • checked_at - when;
  • verified_at - set when a check finds the CNAME (and kept while later checks find it), cleared when one finds it missing or pointing elsewhere; a failed lookup changes nothing.

Summary

Functions

Only the name comes from input: one or more labels under the domain (click), or the whole name (click.example.com). It is kept as the whole name in lower-case ASCII form.

Records the result of a DNS check made at now.

Types

t()

@type t() :: %Karta.Tracking.TrackingHost{
  __meta__: term(),
  check_result: term(),
  checked_at: term(),
  domain: term(),
  domain_id: term(),
  found: term(),
  id: term(),
  inserted_at: term(),
  name: term(),
  updated_at: term(),
  verified_at: term()
}

Functions

changeset(host, attrs, domain_name)

Only the name comes from input: one or more labels under the domain (click), or the whole name (click.example.com). It is kept as the whole name in lower-case ASCII form.

check_changeset(host, result, found, now)

Records the result of a DNS check made at now.