PolyCMS Plugin: Google Analytics

Last updated on May 16, 2026 3:05 AM

Overview

The Google Analytics plugin injects your tracking code into the PolyCMS frontend. It supports both GA4 (Google Analytics 4) and Universal Analytics (legacy).

Activation

  1. Navigate to Blog > Plugins.
  2. Find Google Analytics and click Activate.
  3. Click Settings to configure your tracking code.

Configuration

GA4 (Recommended)

Enter your GA4 Measurement ID (format: G-XXXXXXXXXX):

  1. Go to Google Analytics.
  2. Navigate to Admin > Data Streams > Web.
  3. Copy the Measurement ID.
  4. Paste into the plugin settings field.

Universal Analytics (Legacy)

Enter your UA Tracking ID (format: UA-XXXXXXXX-X).

Note: Google has sunset Universal Analytics. New implementations should use GA4.

Script Placement

Choose where the tracking script is injected:

PlacementDescription
HeaderLoads in — ensures tracking fires before page content renders
FooterLoads before — slightly faster page load, minimal tracking delay

Recommendation: Use Header placement for accurate page view tracking.

What Gets Tracked

Once configured, Google Analytics automatically tracks:

  • Page views across all frontend pages
  • User sessions and bounce rates
  • Traffic sources and referrers
  • Geographic and device data
  • Custom events (if configured in GA4)

Verification

After activation, verify tracking is working:

  1. Open your blog frontend in a browser.
  2. View page source and search for your Measurement ID.
  3. Check Google Analytics Realtime reports for active users.

Related Documentation