Streaming live at 10am (PST)

Google Optimize

Hi There,

I wasn’t able to find this any where else in the Webflow community (hopefully I searched enough!)

I’ve recently set up a Google Optimize account and my contain ID is OPT-####### (a mix of numbers and letters.

Webflow’s Google Optimize integration only accepts GTM-#######. The beginning letters are different but the jist is the same.

Has anyone integrated Google Optimize effectively? Am I using the wrong container ID from Optimize?

Any support would be appreciated,

Thank you!
JC

look this
https://support.google.com/optimize/answer/6211921?hl=en
https://support.google.com/optimize/answer/6211938
A container ID is a 9-digit alphanumeric string beginning with " GTM- " that uniquely identifies it (e.g. " GTM-A1B2CD "). The container ID is part of your Optimize snippet presented when you click INSTALL OPTIMIZE, and it can be found under Container setup > Container information in Optimize.

I have the same problem - it looks like they changed IDs to start with “OPT-” …
Attaching an image where the top one is my new container (starting with “OPT-…”) and bellow are old ones (starting with “GTM-…”)
Does anybody know a workaround?

@mojca use custom code
https://support.google.com/optimize/answer/7513085


https://cxl.com/blog/google-optimize/

1 Like

Thanks @guoshuzhang - I did this afterwards and just wanted to post an update. :slight_smile:

Same issue here on our latest projects.
Optimize is now generating OPT rather than GTM (which I always took as Google Tag Manager rather).

Custom code is fine for now, but it would be good to see this limitation removed, because Webflow is moistly aimed at non-technical customers.

Easy enough to copy and paste snippet into header code. But, a little confused so want to clarify:

  1. I originally installed Google Analytics via “Universal Analytics” code snippet into my header code for google analytics.

  2. I saw on the “Integrations” tab in dashboard that: “If you’ve pasted your Universal Analytics into any of your site’s custom code areas, be sure to remove it to prevent inaccurate data.”

  3. I deleted that custom code and entered just the “Google Universal Analytics Tracking ID:” in the provided space.

  4. Realizing that custom code is not the way to go with predefined integrations, I decided to copy and paste “Container ID” for Google Optimize, only to realize – what we have recently pointed out in this thread – webflow won’t let you use a “Container ID” that starts with OPT-

… Confused because that was expressly mentioned as NOT the thing to do for analytics.

So to summarize: use the predefined integration for google analytics, use the header code for google optimize?

@WebflowCommunityTeam

Hi :wave:

I’ve installed Optimize to our Webflow website. However it seems user experience of the site is heavily negatively influenced by the loading time of the experiment and the rest of the page. Anyone encounted this issue and found a work around?

Curious to read your replies.

I’m experiencing both problems mentioned on this page:

  • I’ve added the OPT-xxxxx code in the relevant Webflow Integrations field, as well as added the Google Analytics code above, but when testing within Google Optimize it says it’s not installed correctly. When inspecting the source code, I can see some Javascript containing the OPT code, but it’s not the JS snippet that Google Optimize provides (maybe it’s a different way using Google Tag Manager?). Feels like Webflow Integrations may not be adding the code in a way that Google themselves can detect.
  • Secondly, adding the OPT code in Webflow Integrations makes the page blank for about 4 seconds on each page load/refresh. I’m using a fast template (Indiego) which loads instantly when the Optimize OPT value is left blank in Integrations.

However, if I keep the OPT value empty in Webflow Integrations, and instead add the script tag that Google Optimize provides, then both problems are fixed - page load is instant, and Google Optimize’s check shows that it is installed correctly.