feat(theme): load bootstrap.js on docs.apify.com for signup attribution by webrdaniel · Pull Request #3099 · apify/apify-docs · GitHub
Skip to content

feat(theme): load bootstrap.js on docs.apify.com for signup attribution - #3099

Open
webrdaniel wants to merge 4 commits into
masterfrom
claude/apify-docs-3085-d0e35d
Open

webrdaniel wants to merge 4 commits into
masterfrom
claude/apify-docs-3085-d0e35d

Conversation

@webrdaniel

@webrdaniel webrdaniel commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Loads apify.com/ext/bootstrap.js on all six docs sites, so visitors who land on docs first get the first-touch and FirstPromoter cookies that Console reads at signup.

Closes #3085. Came up in this #acquisition-team-collaboration thread.

Worth knowing before merge

  • Signup reports shift on deploy day. About 7,200 signups per 90 days get their real first referrer instead of docs.apify.com, and a docs page as their first URL. The data team needs the date.
  • Affiliate attribution barely moves: a few dozen referrals per 90 days, gained and lost, out of about 17,500.
  • Consent: once apify/apify-web#6766 ships, this only works for visitors who already consented on apify.com, because the docs consent banner is broken.
  • Redirects still drop fpr, for example on old /platform/... links. That's a separate PR.
  • PR previews load it too, which drops the issue's last done-when item on purpose. Previews get about 2,400 non-bot visitors per 90 days and about 5 of them sign up later, so a few first touches will be preview URLs. Local builds can't write the cookies, because browsers reject apify.com cookies from other hosts.
  • After merge, check that all six docs sites load ext/bootstrap.js.

Tested live on docs.apify.com: all four cookies set on .apify.com, and apify.com reads them.

🤖 Generated with Claude Code

webrdaniel and others added 2 commits October 21, 2026 09:41
Sets the first-touch and FirstPromoter cookies on .apify.com that Console reads at signup. Only production builds load it, so previews and local builds write none of them.

Closes #3085

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ap.js

Preview hosts proxy the SDK, client and CLI paths to their production builds, so the build-time check still loaded the script there and wrote cookies to .apify.com.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@apify-service-account apify-service-account added the t-web Issues with this label are in the ownership of the web team. label Oct 21, 2026
@apify-service-account

apify-service-account commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

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.

🟢 Approval recommended

The narrowly scoped change has no unresolved findings, and focused reviewer checks confirmed the hostname guard excludes preview and local hosts.

No open issues 🎉

What changed in this PR

Adds signup attribution to the shared docs theme so visits starting on docs can be recorded by Console.

Changes:

  • Injects https://apify.com/ext/bootstrap.js into the page head.
  • Loads it only on docs.apify.com, excluding preview and local hosts.
File Description
apify-docs-theme/​src/​theme.js Adds hostname-gated attribution script loading.

Review effort: Balanced

Previews get a handful of real visitors who later sign up, so the hostname check wasn't worth the extra code. Local builds still can't write the cookies, because browsers reject apify.com cookies from other hosts.

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

This branch has not been deployed

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

Labels

t-web Issues with this label are in the ownership of the web team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Record first touch and FirstPromoter referrals on docs.apify.com with bootstrap.js

5 participants