Skip to content

Add UTM params to session acks#53

Merged
rockwellll merged 1 commit into
mainfrom
session-utm-params
Jun 19, 2026
Merged

Add UTM params to session acks#53
rockwellll merged 1 commit into
mainfrom
session-utm-params

Conversation

@rockwellll

@rockwellll rockwellll commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Thread the initialized page context into session acking so the first ack can include page UTM params.
  • Allow the acks API helper to merge ack metadata while keeping the SDK-owned session and timestamp authoritative.
  • Add focused tests for ack UTM selection and request serialization.

Note

Low Risk
Extends the public acks payload and session init wiring only; existing ack deduplication and authoritative session/timestamp behavior are preserved.

Overview
Session acks now carry utm_params from the page context passed into Session.initialize (the same object Hellotext.initialize uses), so attribution can be tied to the first session ack without changing when an ack is sent.

AcksAPI.send accepts optional metadata (e.g. utm_params) and merges it into the POST body, while session and at still always come from the live SDK state so callers cannot override them.

New tests cover ack request serialization and session ack rules: UTMs on first ack, empty object when missing, latest page on re-ack after session change, and no ack (hence no UTMs) when the session was already acked.

Reviewed by Cursor Bugbot for commit 9cd7c0d. Bugbot is set up for automated code reviews on this repo. Configure here.

@rockwellll rockwellll merged commit 3bbd151 into main Jun 19, 2026
3 checks passed
@rockwellll rockwellll deleted the session-utm-params branch June 19, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant