Google Optimize (GO) a tool for A/B, multivariate and redirect testing. You can use it to compare different versions of your pages and gather data.
People often get confused that GO is a performance optimization tool. In reality, it’s actually used to “optimize” your CTAs, user engagement, etc., by allowing you to test multiple versions of your pages and determine the best one.
But you can use it in combination with NitroPack to boost your page speed.
Some additional configurations may be required for both tools to work correctly. This depends on how GO is installed on your website:
If you installed GO by adding the optimize.js snippet to your website, NitroPack and GO should work fine automatically. NitroPack usually detects the snippet and excludes it from optimization.
If you used Google Tag Manager (GTM) to install GO, some additional configurations must be made.
Mainly, the GTM script has to be excluded from optimization. You can do that with the “Excluded Resources” feature from the “General Settings” menu. Excluding such scripts ensures that their original functionality is preserved and NitroPack does not interfere with their operations. This practice is crucial to prevent disruptions in data collection and maintain the integrity of other dependent site features.
Enter googletagmanager under “Asset URL/Code”
Select “JavaScript” for the Resource Type
Select “Inline” for the Resource Relation
Don’t change the devices or operations
If you are unsure about the script ID to exclude, locate it in the source code of an unoptimized page by searching for keywords like "gtag" or your analytics ID.
Remember to click "Add" and to save your settings.