CAOS offers out-of-the-box support for Google Analytics’ V4 API.
- You’re running CAOS v3.8.0 (or later)
- You’re not using Stealth Mode (Super or Lite) — GA4 support is on the roadmap for Stealth Mode.
Create a GA4 Property
Before configuring CAOS, you should first create a GA4 Property to retrieve your Measurement ID. This can be achieved by choosing the appropriate manual from the Get Started section in this manual.
Once you’re done creating a GA4 Property, select your Property in the top-left of your Google Analytics Dashboard and go to Admin > Data Streams > Web and click the stream. If no stream is listed, click Add Stream and follow the configuration wizard.
After opening the stream, copy the value listed under Measurement ID. We’ll use this to configure CAOS.
Add GA4 Measurement ID to CAOS
Once you retrieved your GA4 Measurement ID, all you need to do, is add it as your Tracking ID in CAOS.
Go to Settings > Optimize Google Analytics > Basic Settings and paste the Measurement ID in the Google Analytics Tracking ID and save your changes.
If your remote JS file settings are set to analytics.js, CAOS will prompt you to change it to gtag.js. Make sure to select gtag.js (v4 API).
That’s it! CAOS will now serve the newly generated gtag.js (re-branded to gtag-v4.js) from your server.
Happy tracking! 🙂