Home / Companies / Netlify / Blog / Post Details
Content Deep Dive

A/B test CMS authored content with Netlify Edge Functions

Blog post from Netlify

Post Details
Company
Date Published
Author
Salma Alam-Naylor
Word Count
1,666
Company Posts That Month
19
Language
English
Hacker News Points
-
Post removed?
No
Summary

In this post, the author discusses how to run an A/B test on a more granular level than just page layouts, without creating new page layouts and rewriting URLs. The goal is to allow content authors to stay in control of the content while enabling developers to write code for the test. This can be achieved by using a Content Management System (CMS) with separate areas or spaces that can be fetched with different API keys and access tokens. The author provides an example of how to A/B test messaging on a home page hero banner, using Netlify Edge Functions, Cloudflare's HTMLRewriter, and environment variables. The code example demonstrates how to assign users to test buckets using browser cookies, fetch data from the CMS at runtime, modify the HTTP response using HTMLRewriter, and track test variants in analytics tools. The author also provides bonus content on using environment variables to control which A/B tests are running.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Edge Computing 4 138 24 15 +165%
Developer Experience 1 252 118 63 +43%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.