Skip to content

feat(marketing): report page requests to Notra GEO - #149

Merged
leoisadev1 merged 5 commits into
mainfrom
devin/1788383347-notra-geo-marketing
Sep 3, 2026
Merged

feat(marketing): report page requests to Notra GEO#149
leoisadev1 merged 5 commits into
mainfrom
devin/1788383347-notra-geo-marketing

Conversation

@devin-ai-integration

Copy link
Copy Markdown

What Changed

Adds @usenotra/geo to apps/marketing and a Vercel routing middleware (apps/marketing/middleware.ts) that sends each page request to Notra GEO via context.waitUntil, then lets the request through untouched. It uses the framework-agnostic Tracker from the package core because the marketing site is Astro deployed as static output on Vercel, so the Next.js proxy.ts recipe does not apply here.

When NOTRA_GEO_TOKEN is unset the middleware is a no-op. The token is read from the Vercel environment and is not committed. .env.example is left alone since it documents public identifiers only.

Why

Notra GEO gives us AI crawler and AI referral analytics for the public site. The SDK skips asset requests itself and never blocks or throws, so there is no visible effect on visitors.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I linked the accepted plugin or provider proposal in Why, or this PR does not add one
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Work done by Devin (Cognition) with Claude.

Link to Devin session: https://app.devin.ai/sessions/9a7438a74bd04ca4ae66e7875e685344
Open in Devin Desktop: https://app.devin.ai/desktop/session/9a7438a74bd04ca4ae66e7875e685344?variant=devin

@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
akeru-bot-landing Building Building Preview Sep 2, 2026 9:11pm UTC

Request Review

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Sep 2, 2026
@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown

Greptile Summary

Adds optional Notra GEO reporting to the marketing site. When configured, the middleware sends crawler and referral analytics in the background without changing the page response.

Confidence Score: 5/5

No blocking failure remains.

The middleware was exercised with tracking disabled, enabled, and with an ingest-network failure; request flow remained unchanged and failed reporting was handled without an unhandled rejection.

T-Rex T-Rex Logs

What T-Rex did

    • Ran the uploaded middleware harness against apps/marketing/middleware.ts with a crawler page request, validating behavior with NOTRA_GEO_TOKEN configured and not configured: when tracking is disabled no background report is scheduled; when tracking is enabled exactly one ingest request is scheduled and the middleware returns undefined.
    • Injected an ingest-network failure and observed no rejected background promise or unhandled rejection.
    • Ran the Marketing workspace TypeScript validation and it completed with zero diagnostics.
    • Uploaded and inspected the geo-middleware harness and evidence, which import the middleware and assert scheduling, unchanged return value, request serialization, and rejection handling, and captured token-absent, token-present, and network-failure scenarios.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (5): Last reviewed commit: "Merge branch 'main' into devin/178838334..." | Re-trigger Greptile

Comment thread apps/marketing/middleware.ts
@leoisadev1
leoisadev1 merged commit 4a38cea into main Sep 3, 2026
11 checks passed
@leoisadev1
leoisadev1 deleted the devin/1788383347-notra-geo-marketing branch September 3, 2026 15:25
@github-actions github-actions Bot mentioned this pull request Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant