How this LookML sessions view models acquisition, engagement and new vs returning traffic
At a glance
Does
One derived table that stitches session basics, geo, landing page, exit page, source and technology into a wide session row. It defines sessions.count, bounce_rate, new and returning session counts, events per session, and distinct counts of geos, campaigns, referers and devices.Trust: Source-defined
Why
The backbone of web acquisition reporting: where sessions come from, whether they bounce and whether visitors return. Every tile on the traffic dashboard reads it.Trust: Inferred
Every field as declared, with the dashboard tiles that read it. Computed from the source; nothing here is edited.
session_appsuser_sessions.view.lookml
Derived table: persists for 1 days. Builds on sessions
Dimensions 1
Name
Type
SQL
Used by
Tags
app_idL11
string
${TABLE}.app_id
-
sessionsuser_sessions.view.lookml
Derived table: rebuilt on a SQL trigger. Builds on sessions_basic (not in repo) sessions_geo (not in repo) sessions_last_page (not in repo) sessions_technology (not in repo)
session_apps is the base view of session_apps: base view
sessions_basic (not in repo) feeds sessions (no relationship declared)
sessions_geo (not in repo) feeds sessions (no relationship declared)
sessions_last_page (not in repo) feeds sessions (no relationship declared)
sessions_technology (not in repo) feeds sessions (no relationship declared)
sessions is the base view of sessions: base view
sessions is joined into events: as sessions, on events.domain_userid = sessions... (no relationship declared)
sessions is read by traffic_pulse: 12 tiles
Worth noticing
New vs returning comes from the cookie session index
Trust: Source-defined
new_vs_returning_visitor is new when domain_sessionidx = 1 and returning when it is above 1. The index is per cookie, so a cleared cookie or a second device counts as new.
Caution: Four upstream session tables are not in the repo
Trust: Missing
The derived table reads ${sessions_basic.SQL_TABLE_NAME}, sessions_geo, sessions_last_page and sessions_technology. None of these views is defined here, so the session logic itself cannot be reviewed.
What goes wrong: Bounce, duration and landing page all depend on rules you cannot see or test from this repo.
Note: start is both a dimension and a dimension group
Trust: Source-defined
dimension: start and dimension_group: start share a name, and the detail set lists zipe_code_count and sessions_from_returning_visitors_count, which are not declared.