All you need to know about A/B testing Single Page Applications with Google Optimize
The problem here is, SPAs have many components that are asynchronous with each other. While the automation framework of Google Optimize implicitly runs for static objects, the appearance of objects in SPAs is unpredictable.