

Choose Google Analytics 4 or Google Tag Manager and paste your ID. The status line shows what GAinWP is sending.
GAinWP adds Google Analytics 4 (or a Google Tag Manager container) to your site and sends the events and dimensions that show what your site achieves, not just how many people visit. It uses GA4’s own event names, so results work in GA4 reports, Google Ads and anything else that reads GA4. It has no dashboards or upsells, and your data goes straight to Google.
generate_lead; a sign-up form can send sign_up. Other forms send form_complete, so a newsletter or search form never counts as a lead. Field values are never sent.login and sign_up, and comments as comment_submit.rel="sponsored" links), same-page anchor clicks, and scroll depth at 25, 50 and 75%.Sent with every event, under GA4-style names: content type and ID (built into GA4), author, primary category (Yoast SEO and Rank Math’s primary category supported), tags, publication month, content group, and whether the visitor is logged in.
A GA4 setup tab lists exactly what to do in Google Analytics for your settings: which custom dimensions to register, which events to mark as key events, and which GA4 settings to change (currency, data retention, enhanced measurement, data redaction). It also warns when Site Kit by Google adds the same tag or events, which would count them twice.
gainwp* names) and events are pushed as { event, intelligence: { ... } }.[gainwp_useroptout] shortcode. A visitor’s opt-out is honored even if the site later turns the shortcode off.Bug reports and feature requests: GAinWP on GitHub.
form_complete, which nothing else sends, so leads your site already tracks another way aren’t counted twice. Set the forms that bring you business to Lead under Settings Google Analytics Forms, and remove any other lead tracking for them. Logins, sign-ups and comments are off until you turn them on. A notice lists what’s new.post_author is now content_author, post_category is content_category, post_tags is content_tags, publish_month is content_publish_month and user_type is user_status. publish_year was removed: the month starts with the year. If you registered the old names as custom dimensions, register the new ones (the GA4 setup tab lists them). Tag Manager’s gainwp* data layer names are unchanged.gtag('config'), as Google recommends, and apply to every event.Version 6.0 is a rewrite for Google Analytics 4. Google stopped processing Universal Analytics data in July 2023, so 5.x has not been collecting anything since then.
After updating, go to Settings Google Analytics and enter your GA4 Measurement ID. Until you do, GAinWP adds no tag and shows a reminder on the Dashboard and Plugins screens.
Carried over automatically:
/out/ instead of a regular expression. Simple patterns convert automatically; if yours can’t, the settings screen tells you and affiliate events stay off until you update it.Removed:
data-vars-ga-* attributes. GA4 has no categories or labels, so tracked links send the standard event names.Opt-outs recorded by 5.x are still honored.
GAinWP connects your site to Google so you can measure visits. It contacts no other service.
Nothing is sent to Google from your server, and nothing is sent before you enter an ID. Events that happen on the server (a login, a form submission) are passed to the visitor’s browser in a short-lived first-party cookie, gainwp_events_ followed by random characters, which holds only the pending event and is deleted when the event is sent or after a day. Visitors who opt out get a gainwp_optout cookie. Google’s Terms of Service, Privacy Policy and Google Analytics Terms apply.