# DataFast solution docs

- [Cookie consent for DataFast in Next.js without breaking attribution](https://agenticboilerplate.com/cookbook/datafast/cookie-consent-for-datafast): DataFast sets a year-long first-party cookie, which needs opt-in consent in the EU and UK. Gate the script render, the goal queue and the checkout metadata on one flag.
- [DataFast shows nothing on localhost? That is on purpose. How to debug it anyway](https://agenticboilerplate.com/cookbook/datafast/datafast-not-tracking-localhost): The script skips localhost, 127.0.0.1, .local hosts, iframes and browsers flagged with datafast_ignore. Turn on data-allow-localhost for a session, check the network tab, then turn it off.
- [DataFast goals versus page views, and when you need neither](https://agenticboilerplate.com/cookbook/datafast/goals-vs-pageviews): Page views are free and automatic. Goals cost events and need a name, a reason and a side of the network. A decision table, the naming rule, and what never to put in a goal.
- [Proxy DataFast through your Next.js domain so ad blockers stop eating visits](https://agenticboilerplate.com/cookbook/datafast/proxy-datafast-through-nextjs): Blockers match the datafa.st hostname. Serve the script and the events endpoint from your own origin with two route handlers, and forward the visitor's IP.
- [DataFast shows revenue as direct traffic? Pass the visitor id into checkout metadata](https://agenticboilerplate.com/cookbook/datafast/revenue-attribution-checkout-metadata): DataFast attributes a payment by reading datafast_visitor_id from the checkout's metadata. Read the cookie on the server when you create the Stripe, Polar, Lemon Squeezy or Dodo checkout.
- [Server-side DataFast goals from Next.js, and why the Goals API returns 404](https://agenticboilerplate.com/cookbook/datafast/server-side-goals-api): Send goals from route handlers and server actions with POST /api/v1/goals, after the response. The visitor id comes from the request cookie, and it must already have a page view.

---

Agentic Boilerplate: A Next.js repo your agent already knows. Free during launch, then $99 once.

- Site map for agents: https://agenticboilerplate.com/llms.txt
- Public API: https://agenticboilerplate.com/openapi.json
- Contact: agenticstudio@gmail.com
