Skip to content

Analítica: canal de la primera visita en eventos de conversión - #334

Open
alejooroncoy wants to merge 3 commits into
mainfrom
claude/heuristic-faraday-e3215b
Open

alejooroncoy wants to merge 3 commits into
mainfrom
claude/heuristic-faraday-e3215b

Conversation

@alejooroncoy

Copy link
Copy Markdown
Owner

Guarda en localStorage el primer canal observado (primera visita gana, respeta la baja), añade entry_landing a la cookie de OAuth y adjunta entry_* a los eventos de acceso/checkout de Plus y Turnitin, con allowlist en el contrato. Documenta por qué hay logins sin pageview y una consulta HogQL por canal.

Pendiente fuera de este repo: que campus-profes copie entry_landing en campus_auth_completed. Probado: test:analytics, test:analytics:transport (SDK real con red interceptada), astro check. Un login local no envía eventos (modo debug), la verificación es la prueba de transporte.

@codex review

🤖 Generated with Claude Code

… eventos de conversión

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
landing Ready Ready Preview Nov 12, 2026 3:47am UTC

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T03:49:08.105752Z 3208de6 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: a92d2abdcf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

alejooroncoy and others added 2 commits November 11, 2026 22:46
@alejooroncoy

Copy link
Copy Markdown
Owner Author

@codex review

Merge de main (tras #333) sin conflictos y arreglos del /review formal: contrato cerrado por canal, 'direct' cede ante un canal real posterior, la baja se respeta al leer, reset al cambiar de cuenta, y tests nuevos (entry-attribution.test.mjs).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3208de6d93

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +24 to 26
// A tab opened before this feature, or cleared storage, must still record the first entry.
try { saveFirstEntry(JSON.parse(decodeURIComponent(previous.value)), now); } catch { /* Optional. */ }
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Evaluate new channels before reusing a cached direct entry

When a visitor first opens the site directly and subsequently follows a campaign or MCP link in the same tab within 24 hours, this branch re-saves the cached direct entry and returns before inspecting the new URL or referrer. Consequently, saveFirstEntry never receives the real channel, and conversion events remain attributed to direct despite the intended replacement behavior. Calling rememberEntry first for / and then for /?utm_source=facebook&utm_campaign=123456789 with the same session storage reproduces this. Evaluate the current entry before this early return, at least when the saved first channel is direct; the new tests miss this because visit() replaces session storage by default.

Useful? React with 👍 / 👎.

This branch was successfully deployed

1 active deployment
Preview — 3208de6d Deployed Nov 12, 2026 by vercel[bot]
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