Get started

Concepts

Projects, events, goals, cohorts, recommendations and decisions in one page.

Projects and keys#

A project is one app in one environment. It has its own events, goals, messages and stats. Each project has a public key (phk_live_…) that is safe in browser code.

Your backend can also use a server API key (tug_…), which covers every project in your workspace. See Authentication.

Events and identities#

track() records what a user did. identify() attaches traits (plan, company size) to a stable user ID, sent as distinctId in the API. Cohort rules look at events and traits together.

Goals#

A goal is an outcome in plain English, such as "get trial users to finish signup", plus a target event that marks success. The target event drives both who gets targeted and what counts as a conversion.

Cohorts and recommendations#

Running intelligence proposes cohorts: groups of users likely to miss the goal, each defined by a rule you can read. For each cohort it drafts recommendations: the copy and button to show on a surface.

Nothing reaches users until a person approves it. Before you do, check the cohort's rule and members, and set the delivery rules (frequency cap, holdout). See Operator console.

Decisions#

A decision is what Tug answers when your app asks what to show a user on a surface: an approved message, or nothing.

Some users are held back as a holdout group and see nothing, so Tug can measure the difference the message made. Both are covered in Counting and holdouts.

  • PageOverviewGet started
  • PageQuick startGet started
  • PageConceptsGet started
  • PageScript tag (tug.js)Install
  • PageReactInstall
  • PageNode and serverInstall
  • PageIdentity verificationGuides
  • PageCounting and holdoutsGuides
  • PagePostHogGuides
  • PageEnvironmentsGuides
  • PageData requestsGuides
  • PageOperator consoleGuides