Uh oh!
There was an error while loading. Please reload this page.
docs: correct the examples in the marketing pages guide - #479
Merged
Conversation
Rename the Proxy function to `proxy` and simplify the `identify` example with the `Identify` type helper. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Dominik Ferber <1765075+dferber90@users.noreply.github.com>
Contributor
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dferber90
enabled auto-merge (squash)
August 18, 2026 04:25
vincent-derks
approved these changes
Aug 18, 2026
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Summary
This change corrects two code examples in the marketing pages guide.
The identify example
Identify,dedupeandflagcome from.identifyconstant theIdentify<Entities>type. The type gives the correct type to thecookiesparameter and to theheadersparameter. You do not write these types again in the example.cookiesandheadersto thegetOrGenerateVisitorIdfunction. The function needs the two parameters.marketingAbTestblock.Before this change, the example sent only
cookiesto thegetOrGenerateVisitorIdfunction. The example on the same page shows that the function needscookiesandheaders. If you send onlycookies, the code does not compile.The proxy.ts example
Change the name of the exported function from
marketingMiddlewaretoproxy.Next.js reads the function with the name
proxyfrom theproxy.tsfile. The namemarketingMiddlewareis the old middleware name. The other pages of the documentation, and the example applications, use the nameproxy.Test
The change is a documentation change. It changes no application code.