build several variants for a single path #29674
Replies: 2 comments 6 replies
-
So in your scenario there would exist Gatsby paths at Couldn't you place your Gatsby site under a path prefix, so |
Beta Was this translation helpful? Give feedback.
-
I would love to see official support this in Gatsby, as Kyle seemed to allude to back in 2018 here. We have been struggling with proper A/B testing strategies for a while, and usually result to using Optimizely. This works ok for in-page tests, but for serving entirely unique pages per user on the same route, it falls pretty flat. There is also a LOT of overhead with optimizely as the Gatsby docs point out as well. Extending creatPage to create variants that are intrinsically linked to a common route seems like the right direction, but I'm curious how we would inform Gatsby of which content to serve. Variants can be determined by a multitude of factors... Data from a service like clearbit, random percentage of traffic, even regional or language specific content could be considered a variant of a page. I would love to explore this more if anyone has ideas, as the need seems to come up a lot more often. Currently we are looking at some sort of edge handler to handle this, but netlify edge handlers aren't GA yet and we don't have budget for something like Outsmartly, so kind of wandering aimlessly in the opposite direction of Optimizely at this point. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Background:
I currently run a gatsby site deployed on GCS and served via a custom backend (not Node.js), which is a requirement due to my company's product scale.
We use gatsby to build our marketing landing pages, specifically building a new page per layout, to reduce layout shift, display a pre-rendered skeleton, and such ( one of many reasons we started using gatsby).
As our needs evolved the need to test several layouts on the same traffic source whilst maintaining the same URL became critical.
We would like to keep the current build architecture that keeps each layout as a standalone build generated page like so:
pages/layout_a.js
,pages/layout_b.js
,pages/layout_c.js
->layout_a/index.html
,layout_b/index.html
,layout_c/index.html
but have our backend "decide" which one to serve when the user navigates to
www.example.com
Currently, this can not be achieved using Gatsby since each generated page is "aware" of its pathname and will not load unless the current URL matches it.
I would like to help champion this feature addition to gatsby to help in any way necessary to make this happen!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions