Google Optimize tag on non-AMP pages when site is on AMP Standard mode
-
Google Optimize tag doesn’t seem to load on non-AMP pages (pages where AMP was specifically disabled) when the site is on AMP Standard mode.
-
Hello @asafm7 ,
Thanks for opening a support topic.
Please share your Site Health information via form privately so we can inspect your setup & guide you accordingly.
Best Regards,
Done.
This is an example for a non-AMP page:
https://eyalshifroni.com/product/the-extended-chair-for-yoga-a-comprehensive-guide-to-iyengar-yoga-practice-with-a-chair/Hello @asafm7 ,
Thanks for sharing the requested information.
Please allow me sometime to perform some checks with the combination of AMP & Optimize. I’ll get back to you after that.
Best Regards,
Thanks.
Hello @asafm7 ,
Thanks for your patience.
Did you add the non-AMP page in Page targeting section in Optimize experience service dashboard?
Best Regards,
Hi,
Yes, I did.
Under a “URL contains any of” rule.
Hello @asafm7 ,
Thanks for the information.
We’ve performed various tests on a standard mode AMP site although we’ve been unable to recreate the same issue. From our side all experiments are working as expected on non AMP URLs, when we’ve disabled AMP individually on a page or post and also when we disable AMP on specific templates.
From discussing this case with the engineering team Site Kit also performs a check on a per URL cases, determining whether a URL is AMP or non AMP before inserting any plugin placed Optimized snippets.
As you’re using standard mode AMP can you switch temporarily to transitional mode AMP before using the Check Installation feature (from the Optimize Service Dashboard) to debug your non AMP URLs? That way you can use the debugger to ensure Optimize is working on your canonical URLs, not specifically URLs where you’ve disabled AMP.
Best Regards,
I disabled AMP completely, and am still not seeing Google Optimize here:
https://eyalshifroni.com/product/props-for-yoga-ii-sitting-asanas-and-forward-extensions/Google Site Kit confirms “Optimize is connected”, but the “Check Installation” feature says: “Optimize installation not found”.
The web page doesn’t have Optimize snippet for the container ID (OPT-PK2Z8SN) installed.”I checked and the container ID is correct. I disconnected Optimize and reconnected it and it didn’t help. What am I missing?
Hey @asafm7 ,
Thanks for the update. As this isn’t an AMP specific issue let’s perform some troubleshooting steps independent of AMP. I was able to encounter the same Optimize installation not found notice when using the Check Installation feature within Optimize when using AMP in standard mode. Can you temporarily switch to transitional mode before another check using this button within Optimize, so it’s checking your non AMP URLS. This installation check feature is limited to non AMP URLs.
I made a quick video showcasing the error you encountered. The video also demonstrates how to correct this error, to ensure the Optimize snippet check works as expected. Please take a look and let us know if you’re able to confirm that it’s working with this approach.
Note also that we are limited to Site Kit plugin support here in the support forums, and I can see that Site Kit has inserted the Optimize experiment container snippet on your site. Once you’re able to confirm that the check completes successfully, the best next step would be for you to share this information with the Optimize Resource Hub to see if they can help you get things working. Sorry we can’t be of further assistance here.
Have a great weekend ahead.
Best Regards,
Thanks for your reply.
I believe I’ve tried everything you suggested, but I’m still getting the same error.
Please see the video:
https://www.loom.com/share/3b1d5563f69c4fa29fd123d63c1fbf88Hello @asafm7 ,
Thanks for sharing the video. As we’ve now added Google Analytics 4 (GA4) integration to Site Kit can you enable the toggle to allow Site Kit to insert the GA4 code snippet?
Optimize should then insert the correct Optimize container alongside the Site Kit placed GA4 snippet.After enabling please perform the same check once more.
Happy Monday!
Thanks.
Doesn’t it require creating a new GA4 property?
That means that Google Optimize doesn’t work with the previous GA? Is it a known issue?
?? @asafm7 ,
Thanks for getting back to us.
Doesn’t it require creating a new GA4 property? That means that Google Optimize doesn’t work with the previous GA? Is it a known issue?
Optimize does work with both UA & GA4 when their snippets are placed through Site Kit. However, since your Universal Analytics snippet has been placed manually instead of through Site Kit, Optimize isn’t working for you right now. To get things working, you’ll need to set up GA4 via Site Kit.
To set up GA4, you’ll need to disconnect and then reconnect the Google Analytics module. Please go through this official doc for further information about GA4 setup.
In order to re-setup Analytics & Optimize please follow the steps below:
1. Go to Site Kit Settings > Connected Services> Disconnect Google Analytics
2. After disconnecting, go to Connect More Services > Set up Analytics
3. While setting up Analytics, enable the Place Google Analytics 4 code option.
4. Disabling the Google Analytics module will also disable Optimize, so you will have to set up Optimize again:
5. Go to Site Kit Settings > Connect More Services> Set up Optimize
6. During setup, enter the Optimize ID from https://optimize.google.com/ > Container ID (If there are a number of containers, choose the one you want to use)
7. Add the AMP experiment settings in JSON format.After configuring Optimize, perform the checks that you followed previously to make sure that Optimize is configured correctly on non-AMP pages.
Have a great day!
Best Regards,
Thanks.
I rather first understand the issue before choosing whether to move to GA4.
So as I understand it, the issue is the fact that the snippet has been manually added not by Site Kit. One thing that could have done it is the WooCommerce Google Analytics Integration plugin. But I disabled it (and cleared cache) and I still get this message on Site Kit:
An existing Universal Analytics tag was found on your site with the ID UA-168579676-1. Since this tag refers to the same property you have selected here, Site Kit will not place its own tag and rely on the existing one. If later on you decide to remove this tag, Site Kit can place a new tag for you.
When inspecting a page, the only place I see a reference to the tag is inside the
_googlesitekitLegacyData
and_googlesitekitAPIFetchData
vars. So it seems Site Kit is wrong about the snippet already being placed?BTW, is there an Enhanced Ecommerce support planed for Google Site Kit?
https://support.google.com/analytics/answer/6032539?hl=enOK, it seems that an AMP analytics code, which is actually necessary for Optimize experiments, confused Site Kit.
Anyway, I disabled AMP altogether. The pain is bigger than the gain it seems.
I disconnected and re-connected all Site Kit services.
Google Optimize is only working when Google Tag Manager is disconnected. Is this known/intended?
- The topic ‘Google Optimize tag on non-AMP pages when site is on AMP Standard mode’ is closed to new replies.