Skip to main content
PageTech Solutions Limited logo Turning Complex Problems Into Confident Technology
  • Consultancy (current section)
    • Consultancy overview
    • Services
    • Fixed-price reviews
    • Testimonials
    • Pricing
    • Working with your IT team
    • FAQ
    • Contact
  • Freelance
    • Freelance overview
    • What I fix
    • Testimonials
    • Pricing
    • Hiring through a platform
    • Availability
    • Tech stack
    • FAQ
    • Contact
  • Recruiters
    • Recruiters overview
    • Fit and experience
    • Testimonials
    • Rates
    • Availability
    • Tech stack
    • FAQ
    • Contact
  • About
  • Workshop
  • Search
  • Talk to Jamie
  1. Home
  2. Workshop
  3. First-Party Session Analytics Platform

Case study

First-Party Session Analytics Platform

Consent-aware first-party analytics with server-side channel classification and enrichment.

Azure FunctionsAzure SQLCloudflareGDPR

At a glance

  1. ChallengeMost websites rely entirely on third-party tracking, with little transparency about what is collected and no ownership of the data.
  2. ApproachA first-party analytics platform with two tiers.
  3. OutcomeAll analytics data held in the business's own infrastructure, queryable with SQL
sessions classified by channel, 1 Sep to 15 Oct 2026
Every session since September 2026

Challenge

Most websites rely entirely on third-party tracking, with little transparency about what is collected and no ownership of the data. Visitors want privacy controls, the business wants its own data, and UK GDPR wants a documented basis for both.

Approach

A first-party analytics platform with two tiers. With consent, structured session data is sent to a C# API and stored in a dedicated Azure SQL database. Without it, a consent-free tier records page views, scroll depth, errors and web-vitals with no persistent visitor identifier, under a legitimate-interest basis that is written down in the privacy policy. The server enriches each session — country, language, device, and an acquisition channel (paid, organic, social, email, referral or direct) decided by a clear precedence of click IDs over campaign parameters over referrer — and flags crawler and monitoring traffic so reporting can exclude it. Session duration and exit page are derived from lifecycle events rather than client-side timers. Every write is idempotent, and a conversion that arrives before its session is recorded against a stub rather than silently dropped. Microsoft Clarity is correlated through shared session tags, and Search Console queries are ingested into the same store.

Outcome

  • All analytics data held in the business's own infrastructure, queryable with SQL
  • Consent explicit and auditable; the consent-free tier documented and minimal
  • Every session since September 2026 (to 15 October) classified by channel on the server, with bot traffic excludable
  • No silent conversion loss, and real session durations without a JavaScript timer

Have a similar problem in your own systems? Book a free 20-minute call or describe it.

Where judgement mattered

  • Two consent tiers with a documented lawful basis, instead of "track everything" or "track nothing"
  • Classifying channel on the server, where the rules can be tested, rather than in every client
  • The stub-session guard: fire-and-forget beacons must never fail a foreign-key check and vanish

Technology stack

C# / .NET 10 · Azure Functions · Azure SQL · vanilla JavaScript (consent-aware, sendBeacon) · Cloudflare · Microsoft Clarity · Google Search Console API

Book a free 20-minute call More case studies

Calendar not loading, or no time suits? Call, WhatsApp or message me.

© 2026 PageTech Solutions Limited. All rights reserved.

Company no. 17014904

VAT no. 514295790

Based in Andover, Hampshire, working remotely with businesses across the UK.

Registered office (post only, no visitors): Belmont Suite, Paragon Business Park, Chorley New Road, Bolton, Lancashire, BL6 6HG

ICO registration no. ZC179729

I use Microsoft Clarity to improve this site's usability, only if you allow it. See my privacy policy for details.

Visa Mastercard American Express PayPal

Contact Hours

Monday 09:00–12:00, 13:00–17:00
Tuesday 09:00–12:00, 13:00–17:00
Wednesday 09:00–12:00, 13:00–17:00
Thursday 09:00–12:00, 13:00–17:00
Friday 09:00–12:00, 13:00–17:00
Saturday Closed
Sunday Closed
UK time (GMT/BST)

Phone: 01264 354354

ContactAboutTestimonialsWorkshopFAQPricingProductsNot a business?PrivacyTermsAccessibilitySearchSite mapBook a free 20-minute callLinkedInX (Twitter)Bluesky