Skip to content
James Ross
articlePublished Updated 8 min read

Student-information system to GA4: admissions attribution for a school

By James Ross

Admissions attribution connects three systems that do not share a person key: the student-information system holds the funnel, GA4 holds the session, and Google Ads holds the spend. The join is a form submission with a stored client_id, a backfill that re-reads a trailing window, and funnel maths that keeps a period count separate from a cohort rate.

Three data sources joined by glowing lines into one funnel dashboard, illustrating admissions attribution GA4 for a school.

The same rule applies here as in Designing a multi-brand commerce control plane: each system owns one fact, and a report is only trustworthy when the join between them is explicit.

What admissions attribution has to answer

The question is not “which campaign got the last click”. It is “which channel produced applications that actually enrolled”.

That distinction changes the data model. Admissions is a long funnel: inquiry, tour or visit, application, acceptance, enrolment. Each stage happens on a different day and often in a different system. A campaign that produces many inquiries and few enrolments is not the same as a campaign that produces fewer, better inquiries, and a last-click report cannot tell them apart.

The dashboard answers three questions:

  • Volume by stage and channel. How many inquiries, tours, applications and enrolments came from each source in a period.
  • Cost per stage. Spend divided by the stage count, not only by the final enrolment, so an early-stage campaign can still be judged.
  • Cohort quality. Of the students who inquired in a given month, how many reached each later stage, and how mature is that cohort.

The third one is where most admissions dashboards mislead, and it is a maths problem before it is a data problem.

Why three systems, and what each one cannot tell you

Each system is authoritative for one part of the story, and each is blind to the other two.

System What it knows What it cannot tell you Join key
Student-information system Applicant identity, stage dates, decisions, enrolment Where the applicant came from Person and application record
GA4 Session source, medium, campaign, landing page, client_id Who the person is, or whether they enrolled client_id, captured at form submission
Google Ads Spend, clicks, campaigns, conversion value Which applications or enrolments resulted Campaign and click ID, if one survives

The student-information system is the system of record for outcomes. GA4 is the system of record for acquisition behaviour. Google Ads is the system of record for cost. A report that takes outcomes from Ads, or cost from the CRM, is guessing.

Joining the systems without a shared key

There is no universal person ID across these systems, so the join has to be built at the one moment all three are present: the form submission.

  1. Capture the GA4 client_id on the page. Read it from the analytics cookie or the data layer when the inquiry form is submitted, alongside the UTM parameters and any click ID.
  2. Submit it with the form. The server writes the client_id, source, medium, campaign, landing page and submission timestamp onto the lead record.
  3. Write the lead into the CRM with that metadata. The CRM remains the owner of the person and the stage dates.
  4. Join reports on the stored client_id. GA4 sessions are joined to CRM records by that value, not by email, because email is not present in GA4.
  5. Never send the person’s identity into GA4. The analytics property holds behaviour, not admissions data; keeping those separate is both a privacy control and a simpler data model.

This gives partial coverage by design. A prospect who inquires by phone, or who blocks analytics, has no client_id. The report should show the matched share and leave the unmatched visible, rather than silently dropping them.

Pulling GA4 with the Data API

The GA4 side is a service account, a signed JWT, and runReport. No SDK is required, and skipping it keeps the dependency surface small.

The token exchange follows RFC 7523: build a JWT with the service-account email as issuer, the analytics read-only scope as the claim, sign it with the private key, and post it to Google’s token endpoint with the jwt-bearer grant type. The returned access token is short-lived, so it is cached in memory and refreshed before expiry.

The report request is a JSON body with a date range, dimensions, metrics and a limit. A minimal request looks like this:

{
  "dateRanges": [{ "startDate": "2026-08-01", "endDate": "2026-08-31" }],
  "dimensions": [{ "name": "date" }, { "name": "sessionDefaultChannelGroup" }],
  "metrics": [{ "name": "sessions" }, { "name": "totalUsers" }],
  "limit": 100000
}

Three implementation details matter more than the request shape:

  • Page the results. A single response has a row limit, so a busy property needs pagination with a maximum page count. The build used a 100,000-row page limit and a hard cap on pages to stop a runaway loop.
  • Map rows by header, not by position. The response carries dimensionHeaders and metricHeaders. Destructuring a row by array index means reordering the metric list silently writes the wrong number into the wrong column, with no type error.
  • Treat the property’s time zone as part of the data. GA4’s date dimension is in the property’s reporting time zone. Converting it to a bare date and comparing it to UTC month boundaries shifts the edges of every month for a property that is not on UTC.

The dashboard stores each report as rows keyed by property, date and dimension values, so a re-run is an upsert rather than an append.

Backfilling history without double counting

Backfill is not a one-time import. It is a re-read of a trailing window, because both GA4 and Google Ads restate recent days as processing completes.

The project’s rule was to re-read a 35-day trailing window and upsert on the natural key (from the code audit). That has three consequences:

  • A closed month can still change. A report generated on the first of the month may not match the same report generated 35 days later. Monthly reporting has to be regenerable, not frozen at first publication.
  • The sync must be idempotent. Every write is an upsert on the natural key, and the window always ends yesterday so a partial day is never stored as a full one.
  • What predates the tag cannot be backfilled. If the GA4 property or the inquiry form’s tracking did not exist in a prior year, no API call will invent that history. The dashboard can only mark the period as unavailable.

There is a second kind of backfill: the CRM-to-GA4 direction. Sending historical milestones into GA4 after the fact is possible with the Measurement Protocol, but it is a one-way event, not a reconstruction of the original session. The original client_id must already have been captured, and the event is joined to that client rather than creating a new one.

Period counts versus cohort counts

A period count and a cohort count answer different questions, and mixing them produces impossible funnel rates.

A period count asks: how many inquiries, tours and applications happened this month? A cohort count asks: of the people who inquired in a given month, how many later applied and enrolled? Dividing one month’s applications by the same month’s inquiries mixes the two. If a large share of this month’s applications came from people who inquired months earlier, the ratio can exceed 100%, which is not a conversion rate at all.

The dashboard keeps them apart:

  • Period view shows stage volumes and channel mix for the selected window, with no stage-to-stage percentage.
  • Cohort view fixes the starting month and follows that group forward, so every rate shares one denominator and is monotonic.
  • Immature cohorts are labelled, not hidden. A cohort from last month has not had time to enrol, and showing its enrolment rate as final is a false statement.

This is also why the funnel chart computes percentages against the first stage rather than the previous stage. A percentage against the previous stage is undefined when an intermediate stage is zero, and it implies a drop-off that the period data cannot support.

Sending milestones back with the Measurement Protocol

The Measurement Protocol lets the CRM tell GA4 that something happened offline, such as an application or an enrolment, and attach it to the original session.

The payload needs the stored client_id, an event name, and a timestamp. The api_secret and measurement_id are query parameters. A minimal event:

{
  "client_id": "CLIENT_ID_STORED_ON_THE_LEAD",
  "timestamp_micros": 1730000000000000,
  "events": [{
    "name": "application_submitted",
    "params": { "stage": "application" }
  }]
}

What this buys is reporting continuity: the offline milestone appears in GA4 against the same session that produced the inquiry, so GA4-side exploration can follow the funnel. What it does not buy is exactness. The protocol is not a ledger, it cannot retract a bad event, and events sent long after the session rely on GA4’s joins. Validate payloads against the Measurement Protocol validation endpoint before enabling a live send, and keep the CRM as the authoritative record of the stage.

What broke and what we changed

Month boundaries shifted with the property time zone. The app stored GA4’s date as a bare ISO date and computed windows in UTC. For a property not on UTC, a month boundary landed on the wrong day. The fix was to carry the property time zone into the date handling and make the boundary explicit.

The (other) row was silently dropped. GA4 collapses high-cardinality dimension values into an (other) bucket. The date parser returned null for it and the sync skipped the row, which under-reported totals with no warning. The fix is to detect and count the bucket, and to alert when it appears on a dimension that is supposed to be low-cardinality.

Rows were destructured by position. A reordered metric list wrote values into the wrong columns with no type error. The client now maps by header name from the response, and a test asserts the header mapping.

A spelling edit crashed production. The migration runner checksums each migration file. A find-and-replace that normalised British to American spelling rewrote a word inside a comment, changed the checksum, and the deployment crash-looped until the file was restored byte-for-byte. Migrations are now immutable by rule, not by convention.

Portal clicks were filtered by a hard-coded domain. The GA4 query that counted outbound clicks to the application portal filtered on a single domain, which was correct for one school and wrong for a second. That is the kind of single-tenant assumption that has to be removed before the dashboard can be reused.

Frequently asked questions

What is admissions attribution?

Admissions attribution is the practice of connecting inquiry, application and enrolment records back to the marketing source that produced them. It combines the admissions CRM's outcomes with web analytics and ad spend, so a school can see cost per inquiry and cost per enrolment by channel rather than only clicks and form fills.

Can GA4 tell you who enrolled?

No. GA4 sees an anonymous client_id and session behaviour, not a person's application or enrolment. The admissions system owns identity and outcomes. The link between them is a client_id captured at form submission and stored on the CRM record, which is what makes the later join possible.

Why not join on email address?

Because GA4 does not expose email. The property holds a client_id, not a person. Email can join the CRM to the ad platform's hashed-identity upload, but it cannot join a CRM record to a GA4 session. Storing the client_id at the point of submission is the only reliable bridge.

How far back can GA4 data be backfilled?

Only to the point where the property and the tracking were collecting data. The Data API cannot invent sessions that never happened. The practical backfill is a trailing re-read of recent days, because GA4 and Google Ads restate recent data as processing completes; a closed month can change for several weeks.

What is the difference between a period count and a cohort count?

A period count measures activity in a date window, such as applications submitted this month. A cohort count fixes a starting group, such as everyone who inquired in August, and follows that same group forward. Mixing them produces rates above 100% when this month's applications come from earlier inquiries.

Does the Measurement Protocol improve Google Ads attribution?

Not directly. It records the offline milestone in GA4 against the original session, and a linked Google Ads account can import GA4 conversions. That path is useful for reporting continuity, but it carries GA4's attribution model and cannot retract a bad event the way the Ads API can.

How do you test a dashboard that joins three APIs?

Test each client against recorded fixtures with an injectable fetch, then test the joins against a seeded database. The suite in this build ran 62 tests, covering date maths, stage decoding and the GA4 client. Fixture-based tests matter here because the APIs cannot be called from CI.