Loading Visitor Journeys Into BigQuery
Separate layers for events, identities, and enrichment make visitor data usable.

Loading visitor journeys into BigQuery requires a pipeline. Raw events, resolved identities, and enrichment fields must go into separate layers that connect to each other before sales and attribution can use them. The warehouse becomes a useful source of truth when those layers preserve the journey, qualify the match, and supply the context needed to act.
Why raw visitor events in BigQuery are not yet a pipeline asset
A visitor reaches the pricing page three times, then leaves without submitting a form or logging in. The event table records the visits, but sales still has no identity it can use. Intent is visible, but its owner is not. Repeated sessions and scroll depth show more of what the visitor does without showing which company or person is behind it. The structural gap is between recording activity and producing a record that can be prioritized and routed, so adding more events alone does not close it.
The three-layer architecture a useful visitor pipeline needs
The architecture consists of three connected tables. The raw event table holds timestamped behavioral facts, including page views, clicks, scroll depth, video plays, exit intent, and form submissions. The resolution table connects anonymous activity to a company or, where supported and permitted, a named individual. The enrichment table adds contact, qualification, CRM, and attribution fields. Each table has a different responsibility in the pipeline.
That separation allows identity and contact data to change without rewriting behavioral history. The fields for resolution include company domain and match confidence, and those for enrichment include title, email, and ad source. Identification creates a record from an anonymous signal. Enrichment fills out the record once a subject exists, so the two operations require separate stages even when one provider supplies both.

What lands in the raw event table and how to structure it
The raw event table depends on a stable visitor_id that subsequent stages can join against. Its minimum fields include that anonymous identifier, session_id, event_type, page_path, timestamp, referral source, and IP address. The visitor identifier can come from a stable first-party cookie or device fingerprint. It must persist across sessions for the same device or browser. A session-only identifier fragments returning visits into disconnected records and prevents downstream queries from reconstructing a multi-touch journey.
Behavioral depth belongs in the ingestion layer too. Scroll depth percentage, time on page, video plays, exit-intent triggers, form focus, blur and submit events, and clicks on high-intent elements distinguish casual browsing from stronger interest. These are facts about events and are kept outside the enrichment fields. IP addresses enter the pipeline for resolution, with retention, hashing, or removal decided under the applicable privacy framework. A session_type field or separate partition also distinguishes human activity from bots and AI agents before those events enter enrichment or attribution calculations.
How identity resolution works and what it can honestly claim to resolve
Identity resolution is probabilistic matching. Company-level resolution compares a visitor’s IP address with known corporate IP ranges and adds firmographic context. It works globally and is the more reliable level. Person-level resolution instead uses an identity graph that links IP, cookie, and device signals to named individuals. Meaningful person-level coverage is limited to US traffic, while international coverage is near zero.
The resolution record should make clear how uncertain the match is. A company result can include company name, domain, employee count, industry, and a confidence score such as 0.61. The team defines a threshold based on its acceptable false-positive rate, and lower-confidence records enter a review queue before proceeding to CRM. De-duplication by company domain also belongs here, before the visitor path creates a duplicate account.
Person-level fields need a separate check of permission based on where the visitor is. For the pipeline described here, EU sessions are excluded from person-level enrichment because of legal constraints as well as limited coverage.
What the enrichment layer adds and which fields belong in BigQuery
The enrichment table references events through visitor_id. Its person fields include full name, job title, seniority, job function, LinkedIn URL, company-domain-matched business email, personal email, do-not-call-filtered phone number, and region. Qualification fields add ICP fit and CRM status. Attribution fields include traffic source, ad_platform, campaign_id, and visit_count, with Google, Meta, and LinkedIn among the platform values. These fields can be used for both CRM write-back and paid-media joins.
Enrichment is not a one-time guarantee of usefulness. An email can become invalid, and a person can leave the role recorded at resolution. Records older than a defined threshold therefore need re-enrichment or a deliverability check. Waterfall enrichment uses more than one provider to raise hit rates and still fill the same output fields. The pipeline should log which provider supplied each field so that coverage can be diagnosed by source.
Filtering AI agents and bots before they corrupt the pipeline
Non-human traffic distorts the pipeline before any match occurs. It inflates session counts, skews attribution, and spends enrichment credits on visits that cannot become human leads. GA4 does not reliably expose all of this activity. Most AI crawlers skip JavaScript and show up only in server-side logs or WAF events, though GA4’s built-in IAB/ABC filter catches some crawlers that identify themselves. JavaScript-executing bots can also appear as human sessions, leaving classification to the pipeline.
User-agent strings alone cannot provide reliable separation. Some agents identify themselves, while others require IP-range information or signed metadata, and masquerading traffic can use residential IP rotation and spoofed browser user agents. Verified operators can publish an Ed25519 public key at /.well-known/http-message-signatures-directory and sign outbound HTTP requests. Supporting that verification lets the receiving site establish that a request came from the claimed operator. Robots.txt directives do not replace this classification work.
In practice, session_type takes the values human, verified_ai_agent, suspected_bot, or unclassified, and only human-classified rows proceed to enrichment. AI-agent activity goes in a separate table for analysis. Its content-consumption patterns provide intelligence about which systems visit and what they read, supporting analysis of AI visibility and buyer research without contaminating the sales dataset.

Getting enriched records out of BigQuery and into the tools that act on them
CRM write-back uses company domain and CRM status to decide whether a record creates or updates an account or contact. It runs after de-duplication as a separate operation. Salesforce-native teams can write back through an API or connector using the warehouse’s company domain, name, title, email, ad source, and visit count. The record should have enough context to be useful without another enrichment call.
Real-time alerting serves a different operational need. A webhook on person.identified can send Slack or Teams an alert when a high-ICP visitor is resolved. The message includes name, title, email, LinkedIn URL, pages viewed, visit count, and ad source, giving the rep context. Ad attribution takes a third path by joining source and campaign fields to cost data inside BigQuery. The same enriched table can also support matched-audience uploads to Google, Meta, and LinkedIn.
Attribution queries: joining visitor journeys to paid-media spend in BigQuery
The foundational join connects behavioral history to an enriched subject. An illustrative expression is SELECT e.visitor_id, e.page_path, e.timestamp, n.company_domain, n.person_name, n.ad_platform, n.campaign_id FROM events e JOIN enrichment n ON e.visitor_id = n.visitor_id WHERE e.session_type = 'human';. It excludes classified non-human activity from the journey. Where a person has been resolved and enrichment is permitted, the result connects that person’s events to acquisition context rather than leaving those facts in separate dashboards.
Company-level attribution then groups identified visits by company_domain, ad_platform, and campaign_id. Joining those groups to imported ad-platform cost data makes it possible to calculate cost-per-identified-account-visit. At person level, the stable visitor identifier connects page views, scroll depth, exit intent, and form submissions across sessions, allowing a multi-touch path that a CRM contact record alone does not contain.
Qualification queries use the same enriched foundation. For example, SELECT company_domain, person_name, visit_count FROM enrichment WHERE icp_flag = true AND crm_status = 'not in CRM' AND visit_count >= 2; surfaces net-new, high-fit records with repeat interest for outbound sequences. Revenue analysis adds closed-won CRM data to the join, either imported directly or synced through HubSpot Data Hub, to compare the ad sources that brought in people who later became customers. Separately, SELECT page_path, COUNT(*) FROM events WHERE session_type IN ('verified_ai_agent', 'suspected_bot') GROUP BY page_path; measures non-human content consumption.
Privacy and compliance constraints that shape the pipeline's geography
Geography determines which fields the pipeline may populate. GDPR requires a lawful basis for processing personal data under one of the six options in Article 6, including consent, legitimate interests, or contract. Consent is not the only possible basis. The EU person-enrichment exclusion described here is a conservative pipeline boundary. A region field and a person_enrichment_permitted boolean derived from region at session time make that boundary executable.
Company-level data requires a more specific distinction. The European Commission states that GDPR governs personal data about individuals, while qualifying that company information can identify a natural person. Company domain, industry, and firmographics therefore generally sit on firmer ground when they do not identify a sole trader or named employee. The schema cannot erase that distinction by labeling data “company-level.” Readers should ask legal counsel what processing is allowed in their own circumstances.
CCPA’s B2B carve-out ended on 1 January 2023, giving California business contacts rights to know, delete, and opt out. The pipeline needs an erasure path capable of removing all rows associated with a visitor ID. Retention also needs an explicit engineering decision. Hashing or dropping IP addresses after resolution reduces the risk of combining raw IPs with names, emails, and LinkedIn URLs. Phone numbers should be do-not-call filtered before storage, because filtering them only at query time leaves them in the warehouse.
Match rate honesty: what the pipeline will actually resolve and why that is enough
Forecasts depend on the denominator used to measure coverage. Vendors may report matches against raw events, unique sessions, eligible B2B sessions, or combined resolution levels, making apparently similar rates difficult to compare. The warehouse makes those populations visible and separable. Company resolution covers a meaningful share of B2B traffic globally, while person resolution reaches only a small fraction of US traffic. Neither should be presented as the other.
For planning, the expected number of usable identified-person records is the number of eligible human US visitors multiplied by the measured person-level match rate and the contact survival rate. A contact survives when it passes deliverability checks and the person still holds the role on record. The notes provide no numeric rate range to substitute into that calculation. The team therefore needs to use the rates it has measured, with the same visitor denominator and with classified non-human traffic left out. Even modest yield can produce named prospects at companies already demonstrating interest, with a forecast grounded in usable records.
Running the complete pipeline end to end
The complete sequence begins with event ingestion and session classification. Human sessions proceed to identity resolution, where confidence thresholds, region permissions, and company-domain de-duplication determine which records advance. Enrichment supplies the permitted contact and qualification fields. Before write-back, the pipeline checks enriched company domains against existing CRM records so known accounts receive updates. Alerts, scheduled CRM updates, audience uploads, and attribution queries then consume the qualified output.
A custom stack follows the same dependencies regardless of which tool handles each layer. Each output schema must provide the inputs that the next stage needs.


