Google Analytics 4 (GA4), Google Search Console (GSC), GTM Server-Side Tagging, UTM Taxonomy, Multi-Touch Attribution, Regex & BigQuery SQL

GA4 event-driven data model, engagement rate, GSC impression/position logic, GTM server-side containers, UTM rules, Shapley/Markov attribution, Regex, and BigQuery SQL

Category
Technical SEO, Core Web Vitals & Digital Marketing
Level
advanced
Languages
en → en
Cards
32
Markdown
Google Analytics 4 (GA4), Google Search Console (GSC), GTM Server-Side Tagging, UTM Taxonomy, Multi-Touch Attribution, Regex & BigQuery SQL (.md)

Flashcards (32)

#Front (Term / Question)Back (Definition / Answer)ExampleMultiple-Choice Options
1What are the limitations of the GA4 Measurement Protocol compared to client-side 'gtag.js' hits for sending server-side offline conversions?The GA4 Measurement Protocol is designed to augment existing client sessions rather than create standalone rich browser sessions: to join an offline CRM/POS event to a user's web session and geographic/device dimensions, the payload MUST include both the user's captured 'client_id' ('user_pseudo_id') and the active 'session_id' ('ga_session_id') within a 72-hour backdating window.
2How does Google Consent Mode v2 ('ad_storage', 'analytics_storage', 'ad_user_data', 'ad_personalization') work in 'Advanced' vs 'Basic' implementation?In Basic Consent Mode, Google tags are completely blocked from firing until the user grants consent on the CMP banner. In Advanced Consent Mode, Google tags load immediately with default 'denied' states and send cookieless pings (stripping client_id cookies) to GA4/Google Ads, enabling Google's behavioral and conversion modeling to recover unconsented attribution.
3In Google Tag Manager, why must 'dataLayer.push({...})' always be used instead of 'window.dataLayer = [{...}]' after the GTM container snippet loads?Reassigning 'window.dataLayer = [{...}]' overwrites the existing 'dataLayer' array and destroys GTM's custom overridden '.push()' method listener, breaking all previously pushed variables and stopping GTM triggers from detecting subsequent events. Always initialize with 'window.dataLayer = window.dataLayer || [];' before the container and call 'dataLayer.push()' thereafter.
4In GA4, what causes the '(other)' row to appear in standard reports, and how do you eliminate it?The '(other)' row appears when a standard pre-aggregated database table exceeds its high-cardinality row limit because a custom dimension registers too many unique values (such as passing raw full URLs with unique session/timestamp query parameters, user IDs, or Epoch timestamps into a custom dimension). Eliminate it by stripping high-cardinality parameters before sending or querying Explorations / BigQuery.
5In Marketing Mix Modeling (MMM), what do 'Adstock' (geometric or Weibull transformation) and the 'Hill Function' represent mathematically?Adstock models the lagged carryover memory effect of advertising (where spend in week t continues decaying into weeks t+1, t+2 via decay parameter λ). The Hill Function is an S-shaped or concave response curve modeling diminishing marginal returns (saturation) as spend increases within a given time period.
6Why does the Google Search Console Performance UI often under-report total clicks compared to top-row totals when filtering by 'Query', and how does the GSC API / BigQuery Bulk Export help?For user privacy, GSC excludes 'anonymized queries' (rare or personal long-tail queries) whenever a Query filter or dimension is applied, and the GSC UI caps exports at 1,000 rows. The Search Console API (up to 25,000 rows per request) and native GSC BigQuery Bulk Export deliver all non-anonymized query-URL combinations daily without UI row limits.
7How do you prevent 'duplicate purchase' key events in GA4 when users refresh or bookmark the '/thank-you' order confirmation page?1. Always include a unique deterministic 'transaction_id' parameter in every 'purchase' event (GA4 automatically deduplicates 'purchase' events sharing the exact same 'transaction_id' from the same user); AND 2. Persist a server-side flag or 'localStorage' check so the dataLayer only pushes the 'purchase' event on initial order rendering.
8Why must payment gateways (like 'paypal.com', 'stripe.com', or 'klarna.com') be added to 'List unwanted referrals' in GA4 Data Stream settings?When a customer leaves your checkout to authenticate payment on 'paypal.com' and redirects back to your '/order-confirmation' page, GA4 will otherwise attribute the conversion to 'paypal.com / referral' under Last-Click rules. Adding 'paypal.com' to Unwanted Referrals instructs GA4 to ignore the redirect and preserve the original marketing channel.
9Write the BigQuery Standard SQL pattern to uniquely identify a specific user session in the GA4 BigQuery export.Concatenate 'user_pseudo_id' with the 'ga_session_id' integer parameter: 'CONCAT(user_pseudo_id, "_", CAST((SELECT value.int_value FROM UNNEST(event_params) WHERE key = "ga_session_id") AS STRING)) AS unique_session_id' (because 'ga_session_id' alone is simply a Unix start timestamp in seconds and can collide across simultaneous users).
10In Google Search Console (GSC), how are an Impression, a Click, and Average Position recorded for standard organic results vs multi-link SERP features?An Impression is counted when a link to your site appears on the current SERP page (or is scrolled into view in infinite/carousel containers). All links pointing to the same property within a single SERP block share the topmost link's position; Average Position averages the top position of your site across all impressions where your site appeared.
11What is the difference between a 'User-Scoped', 'Session-Scoped', 'Event-Scoped', and 'Item-Scoped' Custom Dimension in GA4?User-Scoped persists across future events/sessions for that user (e.g., 'subscription_tier'); Session-Scoped applies to all events within one session (e.g., 'landing_page'); Event-Scoped applies only to the specific event where the parameter was sent (e.g., 'video_title'); Item-Scoped attaches to individual product objects inside the 'items' e-commerce array (e.g., 'item_color').
12How does Google Analytics 4's (GA4) data model fundamentally differ from Universal Analytics (UA)?Universal Analytics used a session-based and hit-type data model (separating Pageview, Event, Transaction, and Social hits with Category/Action/Label). GA4 uses a flat, event-driven data model where every interaction—including 'page_view', 'session_start', 'first_visit', and 'purchase'—is recorded as an Event with up to 25 custom Event Parameters and 25 User Properties.
13In Looker Studio (formerly Google Data Studio), why does blending two tables on a non-unique join key cause metric inflation (fan-out), and how do you prevent it?When joining Table A and Table B on a many-to-many or one-to-many key (like joining daily Ad Spend by Date+Campaign to URL-level GSC clicks by Date), rows duplicate across the join, multiplying 'SUM(Spend)'. Prevent fan-out by pre-aggregating both data sources to the exact same grain (e.g., Date + Campaign) before blending.
14What are the five standard UTM campaign parameters, and what governance rules prevent channel fragmentation in GA4?The five parameters are 'utm_source' (referrer, e.g., 'linkedin'), 'utm_medium' (channel mechanism, e.g., 'paid_social', 'cpc', 'email'), 'utm_campaign' (initiative name), 'utm_content' (creative/placement variant), and 'utm_term' (keyword/audience). Always enforce strict lowercase formatting ('Email' vs 'email' splits rows), align 'utm_medium' with GA4 Default Channel Group regex rules, and NEVER put UTMs on internal links.
15How do you calculate 'Search Share of Voice' (Organic Visibility / Click Share) across a keyword portfolio using GSC and rank tracker data?For each target keyword i with monthly search volume SV_i and your ranking position's expected CTR_i, compute Estimated Clicks = Σ (SV_i × CTR_i), then divide by the total addressable clicks or search volume across the entire keyword basket: Share of Voice = [Σ (SV_i × CTR_i)] / [Σ SV_i].
16Write an RE2-compatible regular expression to filter GSC URLs that have at least 3 subdirectory path levels under 'https://example.com/' (e.g., 'https://example.com/a/b/c/').'^https://example\.com/([^/]+/){3,}' — where '^' anchors the start, '\.' escapes the literal dot, '[^/]+/' matches a non-empty path segment followed by a slash, and '{3,}' requires 3 or more segments.
17In GA4 Explorations, what is the difference between an 'Open Funnel' and a 'Closed Funnel'?In a Closed Funnel, users are only counted if they enter at Step 1 of the funnel. In an Open Funnel, users can enter the funnel at any intermediate step (e.g., entering directly at Step 2 'Product View' via a deep link without visiting Step 1 'Category Page') and be tracked forward from that entry point.
18Compare Rule-Based Attribution models (First-Click, Last-Click, Linear, Time-Decay, Position-Based) with Algorithmic Attribution (Shapley Value and Markov Chains).Rule-based models assign fixed arbitrary weights (Google retired First-Click, Linear, Time-Decay, and Position-Based in GA4/Google Ads, keeping Paid and Organic Last-Click and Data-Driven Attribution). Shapley Value (cooperative game theory) computes a channel's marginal contribution averaged across all coalition permutations; Markov Chain attribution models customer journeys as a state transition graph and calculates each channel's 'Removal Effect' on total conversion probability.
19In GA4 and GSC Regular Expressions (RE2 syntax), write a regex that matches branded queries containing 'acme', 'acmee', or 'acmi' as standalone words or phrases.'(?i)\bacm(e+|i)\b' — where '(?i)' enables case-insensitive matching, '\b' enforces word boundaries so it doesn't match 'academia', and '(e+|i)' matches one or more 'e's or an 'i'.
20Why does a negative lookahead regex like '^(?!.*brand).*$' fail in Google Search Console or Looker Studio's native 'REGEXP_MATCH', and how did GSC solve excluding patterns?Google Search Console, GA4, BigQuery, and Looker Studio use Google's RE2 regular expression engine, which guarantees linear-time execution by strictly disallowing backtracking constructs including negative lookaheads '(?!...)' and lookbehinds. In GSC, select the filter dropdown 'Custom (regex)' -> 'Doesn't match regex' and enter the simple positive pattern '(?i)brand'.
21What causes '(not set)' to appear under 'Landing Page' or 'Session Source / Medium' in GA4?A '(not set)' Landing Page occurs when a session records events (such as 'user_engagement' or custom timer/API events) after a 30-minute session timeout without firing a 'page_view' event in the new session. A '(not set)' Session Source/Medium occurs when the 'session_start' event is missing or when Measurement Protocol hits omit 'session_id' or attribution context.
22Why does 'COUNT(DISTINCT user_pseudo_id)' in GA4 BigQuery often differ slightly from the 'Total Users' metric shown in the GA4 standard UI reports?Standard GA4 UI reports use the HyperLogLog++ (HLL++) probabilistic cardinality estimation algorithm for speed across massive datasets (and include Google Signals / Behavioral Modeling if Blended identity is active), whereas 'COUNT(DISTINCT user_pseudo_id)' in BigQuery computes exact raw cookie cardinality without HLL++ approximation or consent modeling.
23How is a Session ID ('ga_session_id') initiated and extended in GA4, and why do GA4 sessions NOT restart at midnight or when campaign UTMs change mid-session?When a session starts, GA4 generates a 'session_start' event and assigns a Unix timestamp as 'ga_session_id', which times out after 30 minutes of inactivity by default. Unlike Universal Analytics, GA4 does not split sessions at midnight or create a new session when a user clicks an internal or external link with new UTM parameters mid-session.
24How does Marketing Mix Modeling (MMM, such as Google Meridian or Meta Robyn) differ from Multi-Touch Attribution (MTA)?MTA operates at the user/device level using cookies and click logs, making it blind to offline media, walled gardens, and iOS privacy blocks. MMM is a privacy-safe, top-down econometric time-series regression technique that models aggregate weekly/daily KPIs (sales/conversions) against channel spend, impressions, Adstock (carryover decay), Hill saturation curves, seasonality, and macroeconomic controls.
25Why does Safari's Intelligent Tracking Prevention (ITP) cap client-side 'document.cookie' lifetimes to 7 days (or 24 hours with URL decoration), and how does Server-Side GTM resolve it?Safari ITP restricts cookies created via JavaScript ('document.cookie') or set via CNAME cloaking to a maximum 7-day expiration (and 24 hours if arriving from a link with tracking parameters like 'fbclid'/'gclid' across cross-site redirects). An sGTM server deployed on a first-party subdomain behind a load balancer or same-A-record reverse proxy sets 'Set-Cookie' HTTP response headers with 'HttpOnly; Secure', preserving full 400-day cookie lifetimes.
26How is the 'Removal Effect' calculated in a Markov Chain multi-touch attribution model?First compute the baseline total conversion probability P(Conversion) from the Start state to the Conversion state across the full transition matrix. Then set the removed channel's outbound transitions purely to the Null (non-converting) state and compute P(Conversion without Channel X). The Removal Effect is: 1 − [P(Conversion without Channel X) / P(Conversion)].
27In GA4's native BigQuery export schema, how are event parameters (such as 'page_location' or 'ga_session_id') stored, and what SQL pattern extracts them?In the 'events_YYYYMMDD' table, 'event_params' is stored as a repeated 'ARRAY<STRUCT<key STRING, value STRUCT<string_value, int_value, float_value, double_value>>>'. You extract a parameter in Standard SQL using a scalar subquery: '(SELECT value.string_value FROM UNNEST(event_params) WHERE key = "page_location")'.
28What is a Cross-Domain Tracking setup in GA4, and how does the '_gl' linker parameter work when a user clicks from 'brand-a.com' to 'checkout-b.com'?When both domains are listed under 'Configure your domains' in the same GA4 Data Stream, GTM's Conversion Linker decorates outbound links to 'checkout-b.com' with a '?_gl=1*...' URL parameter containing the user's '_ga' Client ID and Session ID alongside a 2-minute cryptographic timestamp hash so the destination domain reads it into its own first-party '_ga' cookie without starting a new self-referral session.
29What happens in GA4 and Universal Analytics if you attach UTM parameters (e.g., '?utm_source=homepage_banner') to an INTERNAL link on your own website?Putting UTM parameters on internal links overwrites the user's original external acquisition source (e.g., turning a Paid Search or Organic Search visitor into 'homepage_banner / internal'), destroying true top-of-funnel attribution. Internal promos should be tracked using GA4's 'view_promotion' and 'select_promotion' e-commerce events.
30What are the three exact criteria that define an 'Engaged Session' in GA4, and how is GA4 'Bounce Rate' calculated?An Engaged Session is any session that: 1. Lasts longer than 10 seconds (configurable up to 60 seconds in stream settings), OR 2. Has 2 or more pageviews/screenviews, OR 3. Triggers at least 1 Key Event (conversion). In GA4, Bounce Rate is simply the inverse of Engagement Rate: Bounce Rate = 100% − Engagement Rate.
31What are the three Reporting Identity options in GA4 ('Blended', 'Observed', 'Device-based'), and how do they stitch user journeys?'Blended' evaluates in priority order: User-ID -> Google Signals -> Device ID (client_id), and uses Behavioral Modeling (ML) to fill gaps when users decline Consent Mode cookies. 'Observed' uses User-ID -> Google Signals -> Device ID without ML modeling. 'Device-based' relies strictly on the first-party cookie ('_ga' client_id) or mobile App Instance ID.
32What is the architectural difference between Client-Side Google Tag Manager (GTM) and Server-Side GTM (sGTM)?In Client-Side GTM, the user's browser loads dozens of third-party vendor scripts (Meta, TikTok, LinkedIn) and sends data directly to each vendor, hurting INP and exposing user IPs/PII. In sGTM, the browser sends a single lightweight HTTP stream to a first-party cloud container (e.g., 'metrics.yourdomain.com'), which strips sensitive PII/IPs, sets durable 'HttpOnly' first-party cookies (mitigating Safari ITP 7-day caps), and forwards events server-to-server via vendor Conversion APIs.