Skip to content

Google Optimize Implementation #27251

Answered by gillkyle
Kevin-Carlos asked this question in Help
Discussion options

You must be logged in to vote

Hey @Kevin-Carlos, I've experimented with a couple different A/B testing options. I haven't found a great way to avoid the anti-flicker myself with Google Optimize though haven't done as much with it as other options.

I was concerned mostly with frontend performance degradations from using a JS blocking 3rd party script. I found VWO to be the least impactful on performance and seems to have some cool logic to keep flickers from happening.

FWIW my gatsby-ssr.js looks like this with Google Optimize. I'd imagine this is close to the most minimal implementation:

import React from "react"

export const onRenderBody = ({ setHeadComponents }) => {
  setHeadComponents([
    <script
      key="goo…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@jamesbarber
Comment options

@doublejosh
Comment options

@doublejosh
Comment options

Answer selected by LekoArts
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #27251 on October 16, 2020 13:02.