Skip to content

docs(pixel): Game Page integration guide, CSP docs, and CDN validation#2847

Open
bkbooth wants to merge 3 commits intomainfrom
claude/bold-euler
Open

docs(pixel): Game Page integration guide, CSP docs, and CDN validation#2847
bkbooth wants to merge 3 commits intomainfrom
claude/bold-euler

Conversation

@bkbooth
Copy link
Copy Markdown
Contributor

@bkbooth bkbooth commented Apr 10, 2026

Summary

  • Adds a comprehensive README.md for the @imtbl/pixel package covering quick-start snippet, consent modes, auto-tracked events, cookie reference, CSP directives (with nonce-based example), browser support matrix, and the Game Page-specific integration snippet with consent: 'anonymous'
  • Includes a post-installation validation checklist and browser compatibility test matrix matching SDK-54's Definition of Done
  • Adds a scripts/validate-cdn.sh script that verifies the live CDN bundle (HTTP 200, correct content-type, gzip size under 10KB budget, expected content markers)

Related tickets

  • SDK-54 — Pixel: Game Page integration and end-to-end validation

Test plan

  • validate-cdn.sh passes against live https://cdn.immutable.com/pixel/v1/imtbl.js (5.3KB gzipped, all markers present)
  • README snippet can be pasted into a blank HTML page and fires events successfully
  • CSP directives confirmed against production API domain (api.immutable.com)

🤖 Generated with Claude Code

@bkbooth bkbooth requested a review from a team as a code owner April 10, 2026 06:00
@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 10, 2026

View your CI Pipeline Execution ↗ for commit 5f15b4b

Command Status Duration Result
nx run-many -p @imtbl/sdk,@imtbl/checkout-widge... ✅ Succeeded 1s View ↗
nx affected -t build,lint,test ✅ Succeeded 7s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-10 06:23:14 UTC

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 10, 2026

✅ Pixel Bundle Size — @imtbl/pixel

Metric Size Delta vs main
Gzipped 5516 bytes (5.38 KB) 0 bytes
Raw (minified) 15165 bytes 0 bytes

Budget: 10.00 KB gzipped (warn at 8.00 KB)

Provide a complete README for the tracking pixel covering the Game Page
snippet, consent modes, auto-tracked events, cookie reference, CSP
directives, and a browser compatibility validation checklist. Also adds
a shell script to verify the CDN bundle is deployed and within the 10KB
gzip budget.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bkbooth bkbooth force-pushed the claude/bold-euler branch from e38a12c to ceeded5 Compare April 10, 2026 06:04
bkbooth and others added 2 commits April 10, 2026 16:04
The identify() method is being removed from the pixel (PR #2846).
Update the README to remove the Identity section and adjust the
full consent description to reflect that identity signals come
only from form submission auto-capture.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…EADME

Keep the README generic for all integrators. Game Page-specific details
and the validation checklist are tracked separately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
</script>
```

Replace `YOUR_PUBLISHABLE_KEY` with your project's publishable key.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mention that you need to get it from Hub?


The script loads asynchronously and does not block page rendering. The default consent level is `none` — the pixel loads but does not collect until consent is explicitly set (see [Consent Modes](#consent-modes)). To start collecting anonymous device signals immediately, add `"consent":"anonymous"` to the init object.

## Consent Modes
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to include who we try to auto detect consent? and what to do if it fails?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants