Home

Issue: 395

Google Optimize 360 - hydration problem?

[issue link]

Does anyone have a suggestion on how to solve the problem not being able to use Google Optimize due to hydration.

I use SSR and the page comes out just fine to the client (browser), when site administrator conducts some A/B testing using Google Optimize (rewrites parts of the DOM) the rehydration rewrites the DOM back to the original text = AB test can not be conducted.

I would prefer that the server rendered page did not get re-populated by the on page window.__NUXT__ variable.

I would like to avoid generating static html-files due to the fact the data comes from CaaS Contentful and we don’t want to be forced to generate new static page “manually” every time a new content page is published in Contentful.

Does anyone have a way avoid hydration or in some other way make this work with SSR?

Maybee the vue-router 2.2 (already out) which supports router.onReady could help in some way, isn’t there even an ugly solution to this problem?

This question is available on Nuxt.js community (#c348)