We are experiencing an issue with our WordPress multi-site, which uses the Newspaper theme. The problem involves incorrect tracking of analytics events in Google Analytics, with the wrong Google property receiving a sub-site’s events. We have seen the Analytics/JS Code settings change to use the wrong measurement ID. This affects our ability to accurately track traffic and user engagement.
The timing seems to correlate with theme / plugin updates. Could updates to the theme or any plugins be altering the Analytics/JS Code settings? Are there recommended steps to diagnose and prevent this from happening?
Certainly, below are the main site:
and two sub-sites that are misfiring:
https://santabarbara.bluedotliving.com/
https://brooklyn.bluedotliving.com/
Hi,
I checked, and Google Analytics is not presented on the source page on those websites https://santabarbara.bluedotliving.com/ -> https://brooklyn.bluedotliving.com/
Thank you!
Hi,
Please try to use this plugin on each website/subsite https://wordpress.org/plugins/insert-headers-and-footers-script/ to set the code to do a test and delete the code from all website/subsites from Theme Panel -> Analytics and see if there appear changes.
Thank you!
Hi Anamaria, I’d like to add a few details to this, with some odd behavior we’ve seen recently. As I mentioned, we’ve seen the analytics code change, after having been in place on each sub-site for awhile. Recently, we also noticed the following:
– An ActiveCampaign tracking script (also deployed via the JS/Code injection in the theme panel) disappeared.
– The default post template for the main site turned off.
All of these changes seem to be occurring in the theme panel. Is there an audit log for changes in the theme panel that would help identify any humans, plugins, or processes that might be changing these settings?
Hello, following up on this with some more information and a request.
We’ve identified sub-sites where the GA4 tag in the Theme Panel is incorrect, and have since corrected them.
On our main site, there is still a remnant of the incorrect tag. Inspecting the WordPress database (wp_options table), the main site shows the correct tag in the td_011 option and the incorrect tag in the td_011_settings option. Everything in the Theme Panel appears to be using the correct tag as of right now. How do we correct the mismatch in tags seen in the database?
Hello,
td_011_settings is used for backup from Theme Panel; there is a limit that you can set to revert back the settings, which is why there are the wrong tags. You can use this plugin https://analytify.io/doc/do-you-support-multisite/#:~:text=Analytify%20is%20a%20powerful%20Google,the%20performance%20of%20their%20websites.
Thank you!