Answers about nextjs
Questions and answers from the Croct community about nextjs.
Is the Vercel Marketplace integration enough to wire env vars, or do I still set them by hand?
setting up a fresh Next project on Vercel and I saw the Croct listing in the Vercel Marketplace. Before I go clicking, does the one-click integration actually…
We stay on Contentful for content. How do I actually wire Croct into our Next.js app?
Keeping content in Contentful, no plan to re-platform the CMS. We dropped our old add-on and now want personalization and A/B testing on the Next.js frontend.…
How do I keep most of the page cached but personalize one slot?
marketing page, mostly static, built with ISR and revalidate on a tag. only one slot near the top needs to be personalized per visitor. everything else is the…
Ad blockers are dropping our Croct requests and skewing results, what is the fix?
A chunk of our visitors never register any events, and when I dug into it in the network tab the requests to /client/web/evaluate, /client/web/track and…
Where do I call fetchContent for a Storyblok-mapped slot in the App Router?
App Router site rendering Storyblok stories, and I have mapped a hero block to a Croct slot. I want the personalized content to arrive server-rendered so…
How do I keep marketing pages static while personalizing only a few routes?
Most of our site is static marketing content and I want it to stay fully static. Only a handful of routes actually need personalized slots, things like the…
Can I stream the page shell first and let the personalized slot fill in?
Next.js App Router. I want static-feeling TTFB. The page has one personalized slot below the fold and I would rather resolve it on the server than swap it in…
Where do I call identify on login in the App Router, server or client?
I want logged-in users recognized so their profile carries across visits. What I cannot figure out is where identify belongs in the App Router, a server…
Best pattern for mixing fetchContent in Server Components with useContent in client islands?
I lead a team at an agency and we are writing down conventions for Croct in App Router projects before we roll it out across several client builds. The SDK…
A content publish broke our prod build, was it because we did not pin the slot version?
Someone on the content side published a schema change to a slot and our Next app immediately started getting content that did not match our types. Here is…
Why does my attributes object work in React but not in Next fetchContent?
took an attributes object that worked fine with useContent in a plain React app and moved it into a Next server fetchContent call. the values are just not…
Does server-side fetchContent add a TTFB penalty on my Next app?
i moved our hero personalization out of a client hook and into a server fetchContent call in the App Router. my assumption was that the extra server-side…