Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 798 forks source link

Google Analytics fails to save tracking code #38089

Closed mrfoxtalbot closed 3 months ago

mrfoxtalbot commented 3 months ago

Impacted plugin

Jetpack

Quick summary

On simple sites and self-hosted, adding a Google Analytics tracking code and pressing "save" shows a success message but does not actually save.

https://github.com/Automattic/jetpack/assets/4452464/a8eecbca-9c74-4873-83a8-d6753de1b5de

Steps to reproduce

  1. Go to https://wordpress.com/marketing/traffic/
  2. Add a Google Analytics tracking code
  3. Save

A clear and concise description of what you expected to happen.

It should save. If the code is invalid, it should show an error message.

What actually happened

It did not save but it showed a message saying it had saved.

Impact

All

Available workarounds?

No but the platform is still usable

Platform (Simple and/or Atomic)

Simple, Atomic, Self-hosted

Logs or notes

Google's deadline to sunset the old version of GA is July 1st, I would imagine a lot of users will update their tracking code just before the deadline, we should fix this ASAP.

Might be related to https://github.com/Automattic/jetpack/issues/36920

aisajib commented 3 months ago

I had a user mention that they were unable to connect Google Analytics in 8363457-zd-a8c.

They don't have a custom domain yet, so I asked them to set one up first. I think this user may have faced this issue already.

github-actions[bot] commented 3 months ago

Support References

This comment is automatically generated. Please do not edit it.

jeherve commented 3 months ago

Related:

sergeymitr commented 3 months ago

I was able to reproduce it on Simple (no luck with self-hosted for now). Working on a fix.

Thanks for reporting the issue.

sergeymitr commented 3 months ago

The issue was caused by extracting API's from Jetpack into the Google Analytics package: https://github.com/Automattic/jetpack/pull/37358 It only affected settings WPCOM Simple sites, tracking wasn't affected.

The fix is now deployed: D153701-code

Please let me know if the issue persists.

mrfoxtalbot commented 3 months ago

It works! Thank you very much for the quick turnaround!