Add GA4 conversion tracking for subscription form - #93
Merged
Conversation
Co-authored-by: katsar0v <7236157+katsar0v@users.noreply.github.com>
Co-authored-by: katsar0v <7236157+katsar0v@users.noreply.github.com>
Co-authored-by: katsar0v <7236157+katsar0v@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add GA4 conversion tracking option for subscription form
Add GA4 conversion tracking for subscription form
Jan 6, 2026
- Document new GA4 conversion tracking feature - Added entry to [Unreleased] section - Includes details about the new setting and tracking functionality
Resolved conflicts: - CHANGELOG.md: Merged GA4 Conversion Tracking and Mass Delete Subscribers features - languages/mail-system-by-katsarov-design-bg_BG.po: Merged translation strings - languages/mail-system-by-katsarov-design.pot: Merged translation strings - languages/mail-system-by-katsarov-design-bg_BG.mo: Regenerated from .po file - languages/mail-system-by-katsarov-design-de_DE.mo: Regenerated from .po file - plans/: Removed directory (not part of merge scope) All 191 tests passed successfully.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Marketing teams cannot track newsletter signups as conversions because the AJAX subscription handler doesn't emit analytics events.
Changes
Settings
enable_ga4_trackingcheckbox in admin settings (Subscription Form section)Frontend
wp_localize_scriptgtag('event', 'generate_lead', {...})on successful subscription when enabled=== true) and existence verification forgtagExample
Tests & Translations
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/Brain-WP/BrainMonkey/zipball/d95a9d895352c30f47604ad1b825ab8fa9d1a373/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/vEACbP /usr/bin/composer install(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/aqPzP7 /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/vEACbP /usr/bin/composer install(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/aqPzP7 /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/845eb62303d2ca9b289ef216356568ccc075ffd1/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/aqPzP7 /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/244d7b04fc4bc2117c15f5abe23eb933b5f02bbf/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/aqPzP7 /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/7c8d18b4d90dac9e86b0869a608fa09158e168fa/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/aqPzP7 /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/antecedent/patchwork/zipball/8b6b235f405af175259c8f56aea5fc23ab9f03ce/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/aqPzP7 /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/composer/installers/zipball/12fb2dfe5e16183de69e784a7b84046c43d97e8e/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/vEACbP /usr/bin/composer install(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/aqPzP7 /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/vEACbP /usr/bin/composer install(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/aqPzP7 /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/hamcrest/hamcrest-php/zipball/f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/aqPzP7 /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/aqPzP7 /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/nikic/PHP-Parser/zipball/3a454ca033b9e06b63282ce19562e892747449bb/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/aqPzP7 /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/aqPzP7 /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/aqPzP7 /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/aqPzP7 /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/aqPzP7 /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/aqPzP7 /usr/bin/composer install --no-interaction(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.