Skip to content

Instantly share code, notes, and snippets.

@njbmartin
Created May 26, 2021 23:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save njbmartin/826b25a085a923b87b25bd90e6f464a3 to your computer and use it in GitHub Desktop.
Save njbmartin/826b25a085a923b87b25bd90e6f464a3 to your computer and use it in GitHub Desktop.
import React from 'react'
import { useGoogleOptimize } from '@heights/react-use-google-optimize'
const App = () => {
const [isVariation] = useGoogleOptimize("OPTIMIZE_EXPERIMENT_ID")
return (
<>
<h1>{ isVariation ? "This is a variant" : "This is control" }</h1>
</>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment