GTM/Firebase Analytics: How To Ensure That Mobile Container Automatically Updates After Publishing?
We are setting up a new version of our app and we are switching from the legacy (v4) GTM SDKs to using the v5 mobile Google Tag Manager via Firebase.
On Thursday and Friday morning I ran some extensive tests on our tracking setup on Android and found a number of bugs in the GTM setup. I fixed them and then republished the app around mid-day on Friday.
On Monday morning (yesterday) I ran some additional tests and none of the fixes that I made worked, in the sense that the data that reached Google Analytics (the ultimate endpoint) showed the same errors from the previous round of testing.
My only conclusion is that the container didn't automatically update over the weekend (according to this, it should update every twelve hours).
I am pretty certain that this is the problem because some of the fixes included updating lookup table variables (we don't pass event category / event action as parameters from the app, these are mapped via two separate lookup tables), and the event category / action values were unchanged in GA in the second round of testing, even though they had been altered in GTM in between.
The documentation is a bit vague on exactly how the update process works - is there a way to debug exactly how to set up GTM in the app to ensure that it will automatically update when the container is republished in the GTM UI?
OK, the answer was pretty simple in the end, but as far as I can tell this is written nowhere in the documentation.
So, all you have to do is not rename the JSON file that you download from the GTM web interface - that's it! Our Android devs had renamed the different versions as gtm_dev.json, gtm_test.json, gtm_prod.json, etc, and this caused the automatic update to fail. That's it!
So if you are googling this error, double-check that your JSON file in the app has not been renamed.
- → How can I query Firebase for an equalTo boolean parameter?
- → How can I access nested data in Firebase with React?
- → Firebase simple blog (confused with security rules)
- → Removing item in Firebase with React, re-render returns item undefined
- → AngularJS Unknown Provider Error (Firebase & AngularFire)
- → How do you pass top level component state down to Routes using react-router?
- → "this" is null in firebase query function in reactjs
- → Angular Module Failed to Load
- → Multiple dex files define Lcom/google/android/gms/internal/zzrx;
- → Joining Firebase tables in React
- → How can I make add firepad to my reactjs project?
- → How to use Cloud Functions for Firebase to prerender pages for SEO?
- → React.js component has null state?