feat: add MaxMind minFraud device tracking script#1289
Merged
Conversation
Add the MaxMind device.js snippet (account ID 1313245) to both site layouts so the marketing-site browsing session contributes a device fingerprint to the existing minFraud check that runs server-side on signup. Token is collected per-domain by MaxMind via first-party cookie plus their cross-site storage; this captures pre-conversion visitors who later sign up at auth.datum.net. Key features/changes: - Add dns-prefetch hint for device.maxmind.com in both layouts - Inject inline IIFE in Layout.astro and LayoutSimple.astro that sets window.__mmapiws.accountId and lazy-loads device.js via requestIdleCallback, following the existing HelpScout and Marker.io deferred-load pattern - Production-gated via the existing isProduction toggle so dev and preview builds never hit MaxMind Same account ID is already used server-side by the fraud service when it submits minFraud queries, so browser fingerprints correlate with backend scores without any additional configuration.
yahyafakhroji
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge order (3 of 5)
Part of a cross-repo rollout enabling MaxMind device fingerprinting in the signup fraud check.
Independent of the other PRs — safe to merge any time. Cookies are per-domain, so this just supplements the (required) collection on `auth.datum.net`.
Summary
The browser-collected token is read by `auth-ui` at signup and forwarded to the existing minFraud check server-side. Cookies are per-domain — this PR is the "marketing supplementary coverage" leg of the rollout; the strictly-required collection happens on `auth.datum.net`.
Reuses the same MaxMind account (`1313245`) already used by the fraud service, so browser fingerprints correlate with backend scores without extra config.
Test plan