Sub topic 6
Install GA4 through a website platform integration
This chapter assumes you understand users, sessions, and events, and that you have access to a GA4 property and its web data stream. You also need administrator or editor access to your website platform, such as WordPress, Shopify, Wix, or another hosted site builder.
A website platform integration connects your site to GA4 through a built-in setting or plugin. You usually provide the Measurement ID for the web data stream. The platform then adds the Google tag to your pages and may handle updates for you.
When to choose a platform integration
Use a platform integration when your site is managed through a content management system or hosted platform and you do not normally edit the site's HTML. This method is often faster than manual installation.
| Installation method | Best fit | Main concern |
|---|---|---|
| Platform integration | A supported CMS or hosted site builder | Settings differ between platforms |
| Manual Google tag | Direct access to page templates | You must maintain the code |
| Google Tag Manager | Several tags or complex tracking needs | Adds another system to configure |
A platform integration is usually appropriate for basic page-view tracking and standard events. It may not support every custom event or consent requirement. Check the platform's documentation before installing a separate plugin or script.
Find the Measurement ID
In Google Analytics, open the property that should receive the data. Open the web data stream and copy its Measurement ID. It has the form G-XXXXXXXXXX.
The ID identifies the destination for the tag. It is not a password, but it must belong to the correct property and web stream. Confirm the website URL shown in the stream before copying the ID.
Install the integration
The exact labels vary, but the process usually follows these steps:
- Sign in to your website platform.
- Open the analytics, marketing, or integrations settings.
- Choose Google Analytics 4 or Google tag.
- Paste the web stream's Measurement ID.
- Save or publish the setting.
- Confirm that the integration applies to every page, including pages created by templates or checkout flows where appropriate.
Some platforms ask for the entire tag snippet instead of the Measurement ID. Use the format the platform requests. Do not paste a script into a field that expects only an ID.
For example, a platform might provide a field named Google Analytics measurement ID. Enter only the ID:
G-XXXXXXXXXXA plugin may instead offer a connection flow. In that case, authorize the correct Google account, select the correct property and web stream, and complete the setup without adding a second tracking plugin.
Check platform-specific behavior
Platform integrations can change how data is collected. Review these settings before testing:
- Whether the integration sends page views automatically.
- Whether it tracks history changes in single-page applications.
- Whether it includes checkout or embedded pages.
- Whether it supports consent mode.
- Whether it creates additional events, such as purchases or form submissions.
- Whether a staging site uses the same Measurement ID as production.
A platform may use its own event names and parameters. Record those names before building reports or conversions that depend on them.
Prevent duplicate installation
Do not install the tag through a platform integration and also paste the same tag into the theme, add it through Google Tag Manager, or activate another analytics plugin unless you have a specific reason and understand the result.
Duplicate tags can send two page views for one page load. They can also duplicate events, making users, sessions, and conversions appear higher than they are. Search the platform settings, theme files, plugins, and Tag Manager containers for the same Measurement ID before adding another implementation.
Verify the integration
Open the published site in a private browser window. In GA4, open the Realtime report and look for activity from the test visit. Use Tag Assistant to inspect whether the Google tag loads and which Measurement ID it uses.
For more detailed testing, enable debug mode through the platform if it supports that option, or use a supported debugging tool. Then check DebugView in GA4. Test one page load and one known interaction. If both appear once, the basic integration is probably working.
Exercise
A site has a GA4 plugin enabled, a Google tag in its theme header, and a Google Tag Manager container that also sends GA4 page views. What should you do first?
Show answer
Choose one primary installation route, disable the other basic GA4 page-view implementations, publish the change, and verify that each test page view appears only once.