Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions web/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ const nextConfig = {
'https://agentrelay.com/?utm_source=ai-engineer-worldfair&utm_medium=banner&utm_campaign=ai-engineer-worldfair-2026',
permanent: false,
},
// In-person event QR card → the relay GitHub repo, tagged like /banner
// above so card scans are attributable to the current event. Temporary
// for the same repointing reason.
{
source: '/qr-card',
destination:
'https://github.com/agentworkforce/relay?utm_source=ai-engineer-worldfair&utm_medium=qr-card&utm_campaign=ai-engineer-worldfair-2026',
permanent: false,
},
Comment on lines +66 to +74

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.

medium

While adding UTM parameters to the destination URL is a common practice, there are two technical limitations in this setup that will prevent you from tracking engagement as intended:

  1. Next.js Config Redirects are Server-Side: Redirects defined in next.config.mjs are executed at the server/edge level (returning a 307 Temporary Redirect response directly). Because of this, the browser never loads or executes any client-side analytics scripts (e.g., Google Analytics, Plausible, Fathom) on your domain (agentrelay.com) for the /qr-card path.
  2. GitHub Does Not Track UTM Parameters: GitHub's built-in repository traffic analytics only track referring domains and popular paths. They do not parse, store, or display query parameters like utm_source, utm_medium, or utm_campaign.

Suggested Alternatives:

  • Option A (Client-Side Redirect Page): Create a lightweight page at app/qr-card/page.tsx (or pages/qr-card.tsx) that triggers a client-side analytics event (e.g., track('QR Card Scan')) and then redirects the user to GitHub using window.location.replace('https://github.com/agentworkforce/relay').
  • Option B (Edge Middleware): If you are using Next.js Middleware (middleware.ts), you can intercept requests to /qr-card, send a server-side tracking event to your analytics provider's HTTP API (e.g., Plausible Events API or GA4 Measurement Protocol), and then return the redirect response.

{ source: '/quickstart', destination: '/docs/quickstart', permanent: true },
{ source: '/relayfile', destination: '/primitives#file', permanent: true },
{ source: '/relayfile/:path*', destination: '/primitives#file', permanent: true },
Expand Down
Loading