{"id":43461,"date":"2016-04-27T13:37:49","date_gmt":"2016-04-27T13:37:49","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/cf7-google-analytics\/"},"modified":"2025-12-06T20:41:40","modified_gmt":"2025-12-06T20:41:40","slug":"cf7-google-analytics","status":"publish","type":"plugin","link":"https:\/\/dsb.wordpress.org\/plugins\/cf7-google-analytics\/","author":8798390,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.8.12","stable_tag":"1.8.12","tested":"6.8.5","requires":"4.3","requires_php":"","requires_plugins":null,"header_name":"Contact Form 7 Google Analytics Integration","header_author":"Andrew Minion","header_description":"","assets_banners_color":"675e72","last_updated":"2025-12-06 20:41:40","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/cash.me\/$AndrewRMinionDesign","header_plugin_uri":"https:\/\/andrewrminion.com\/contact-form-7-google-analytics\/","header_author_uri":"https:\/\/www.andrewrminion.com","rating":4.8,"author_block_rating":0,"active_installs":7000,"downloads":128888,"num_ratings":12,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.1":{"tag":"1.1","author":"macbookandrew","date":"2016-04-27 13:52:43"},"1.2":{"tag":"1.2","author":"macbookandrew","date":"2016-05-04 16:48:47"},"1.2.1":{"tag":"1.2.1","author":"macbookandrew","date":"2016-07-29 21:52:02"},"1.2.2":{"tag":"1.2.2","author":"macbookandrew","date":"2016-09-19 16:50:36"},"1.3.0":{"tag":"1.3.0","author":"macbookandrew","date":"2017-08-05 10:59:42"},"1.4.0":{"tag":"1.4.0","author":"macbookandrew","date":"2017-10-31 13:03:47"},"1.5.0":{"tag":"1.5.0","author":"macbookandrew","date":"2017-11-01 17:24:38"},"1.6.1":{"tag":"1.6.1","author":"macbookandrew","date":"2018-01-04 20:38:20"},"1.7.0":{"tag":"1.7.0","author":"macbookandrew","date":"2018-03-20 15:17:30"},"1.7.1":{"tag":"1.7.1","author":"macbookandrew","date":"2018-03-21 13:37:46"},"1.7.2":{"tag":"1.7.2","author":"macbookandrew","date":"2018-03-31 19:59:48"},"1.7.3":{"tag":"1.7.3","author":"macbookandrew","date":"2018-04-25 13:52:43"},"1.7.4":{"tag":"1.7.4","author":"macbookandrew","date":"2018-05-01 13:56:28"},"1.7.5":{"tag":"1.7.5","author":"macbookandrew","date":"2018-05-08 15:08:58"},"1.8.0":{"tag":"1.8.0","author":"macbookandrew","date":"2018-11-10 20:14:50"},"1.8.1":{"tag":"1.8.1","author":"macbookandrew","date":"2018-11-12 15:19:15"},"1.8.10":{"tag":"1.8.10","author":"macbookandrew","date":"2023-10-19 03:03:34"},"1.8.11":{"tag":"1.8.11","author":"macbookandrew","date":"2024-01-03 19:41:05"},"1.8.12":{"tag":"1.8.12","author":"macbookandrew","date":"2025-12-06 20:41:40"},"1.8.2":{"tag":"1.8.2","author":"macbookandrew","date":"2018-11-14 18:27:19"},"1.8.3":{"tag":"1.8.3","author":"macbookandrew","date":"2018-12-01 21:02:14"},"1.8.4":{"tag":"1.8.4","author":"macbookandrew","date":"2018-12-29 19:34:11"},"1.8.5":{"tag":"1.8.5","author":"macbookandrew","date":"2019-01-16 14:27:03"},"1.8.6":{"tag":"1.8.6","author":"macbookandrew","date":"2019-01-16 14:45:26"},"1.8.7":{"tag":"1.8.7","author":"macbookandrew","date":"2019-01-18 02:11:05"},"1.8.8":{"tag":"1.8.8","author":"macbookandrew","date":"2023-02-18 22:34:32"},"1.8.9":{"tag":"1.8.9","author":"macbookandrew","date":"2023-10-13 13:51:11"},"prefix":{"tag":"prefix","author":"macbookandrew","date":"2024-01-03 19:36:05"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":"1","4":"1","5":"10"},"assets_icons":{"icon-256x256.jpg":{"filename":"icon-256x256.jpg","revision":2624045,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":2624045,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":2624045,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1","1.2","1.2.1","1.2.2","1.3.0","1.4.0","1.5.0","1.6.1","1.7.0","1.7.1","1.7.2","1.7.3","1.7.4","1.7.5","1.8.0","1.8.1","1.8.10","1.8.11","1.8.12","1.8.2","1.8.3","1.8.4","1.8.5","1.8.6","1.8.7","1.8.8","1.8.9","prefix"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[232,1152,1005],"plugin_category":[36,40,42],"plugin_contributors":[78963],"plugin_business_model":[],"class_list":["post-43461","plugin","type-plugin","status-publish","hentry","plugin_tags-analytics","plugin_tags-contact-form-7","plugin_tags-google-analytics","plugin_category-analytics","plugin_category-calendar-and-events","plugin_category-contact-forms","plugin_contributors-macbookandrew","plugin_committers-macbookandrew"],"banners":{"banner":"https:\/\/ps.w.org\/cf7-google-analytics\/assets\/banner-772x250.jpg?rev=2624045","banner_2x":"https:\/\/ps.w.org\/cf7-google-analytics\/assets\/banner-1544x500.jpg?rev=2624045","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/cf7-google-analytics\/assets\/icon-256x256.jpg?rev=2624045","icon_2x":"https:\/\/ps.w.org\/cf7-google-analytics\/assets\/icon-256x256.jpg?rev=2624045","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Adds Google Analytics Event Tracking to all Contact Form 7 forms sitewide, using \u201cContact Form\u201d as the Event Category, the Contact Form 7 event as the Event Action, and the form name as the Event Label.<\/p>\n\n<p>Supports the most popular Google Analytics plugins, including the following:<\/p>\n\n<ul>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/google-analytics-for-wordpress\/\">Google Analytics by MonsterInsights<\/a>, formerly \u201cGoogle Analytics by Yoast\u201d<\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/google-analytics-dashboard-for-wp\/\">Google Analytics Dashboard for WP<\/a> by Alin Marcu\/ExactMetrics<\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/googleanalytics\/\">Google Analytics<\/a> by Kevin Sylvestre<\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/pc-google-analytics\/\">Google Analytics<\/a> by Praveen Chauhan<\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/analytics-tracker\/\">Analytics Tracker<\/a> by Valeriu Tihai<\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/enhanced-e-commerce-for-woocommerce-store\/\">Enhanced Ecommerce Google Analytics Plugin for WooCommerce<\/a> by Tatvic<\/li>\n<li>The default Google Analytics code copied from the Analytics admin panel (both the newer <code>gtag.js<\/code> and the older universal <code>analytics.js<\/code>)<\/li>\n<li>Google Tag Manager (using <code>gtm.js<\/code>) (see additional setup instructions in the FAQ section)<\/li>\n<li>Any other plugin using <code>gtag<\/code>, <code>ga<\/code>, <code>_gaq<\/code>, or <code>__gaTracker<\/code> as the Javascript function<\/li>\n<li>To add others, <a href=\"https:\/\/github.com\/macbookandrew\/cf7-google-analytics\">open a pull request<\/a><\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate the plugin<\/li>\n<li>Enable the actions you would like to send (if you skip this step, it will send all available actions).<\/li>\n<li>Enjoy!<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='what%20about%20gdpr%20%28general%20data%20protection%20regulation%29%3F'><h3>What about GDPR (General Data Protection Regulation)?<\/h3><\/dt>\n<dd><p>This plugin does not collect or send any personal information or form submissions to Google Analytics. The only form-related information sent is the name of the form and the submission result (invalid, spam, mail sent, mail failed, and sent).<\/p>\n\n<p>Google Analytics does collect more information including, but not limited to, the following:<\/p>\n\n<ul>\n<li>Page name, URL, and language<\/li>\n<li>Screen and window size<\/li>\n<li>The user\u2019s IP address<\/li>\n<\/ul>\n\n<p>For more information, refer to <a href=\"https:\/\/privacy.google.com\/businesses\/compliance\/#?modal_active=none\">Google\u2019s compliance information<\/a>.<\/p>\n\n<p>Please also note that Contact Form 7 and other plugins may collect, process, or store user data.<\/p><\/dd>\n<dt id='where%20will%20events%20show%20up%3F'><h3>Where will events show up?<\/h3><\/dt>\n<dd><p>Check your statistics in Google Analytics under <em>Behavior &gt; Events<\/em> or under <em>Real-Time &gt; Events<\/em>.<\/p><\/dd>\n<dt id='what%20events%20will%20be%20shown%3F'><h3>What events will be shown?<\/h3><\/dt>\n<dd><p>This depends on the settings you choose.<\/p>\n\n<ul>\n<li><strong>Invalid<\/strong> - Fires when an Ajax form submission has completed successfully, but mail hasn\u2019t been sent because there are fields with invalid input.<\/li>\n<li><strong>Spam<\/strong> - Fires when an Ajax form submission has completed successfully, but mail hasn\u2019t been sent because a possible spam activity has been detected.<\/li>\n<li><strong>Mail Sent<\/strong> - Fires when an Ajax form submission has completed successfully, and mail has been sent.<\/li>\n<li><strong>Mail Failed<\/strong> - Fires when an Ajax form submission has completed successfully, but it has failed in sending mail.<\/li>\n<li><strong>Sent<\/strong> - Fires when an Ajax form submission has completed successfully, regardless of other incidents.\n\n<ul>\n<li>This is the only event available if you have Contact Form 7 version 4.7 or earlier.<\/li>\n<li>This is the only original event sent by this plugin. I recommend enabling the other four and disabling this event, unless you need it for old goals you had set up from several years ago.<\/li>\n<\/ul><\/li>\n<\/ul><\/dd>\n<dt id='how%20do%20i%20set%20a%20goal%20in%20google%20analytics%3F'><h3>How do I set a goal in Google Analytics?<\/h3><\/dt>\n<dd><p>Note: these instructions are provided for reference and may become out of date if Google Analytics changes their feature set or labels.<\/p>\n\n<ol>\n<li>Click on \u201cAdmin\u201d in your Google Analytics account menubar<\/li>\n<li>In the right-most column (\u201cView\u201d), click on \u201cGoals\u201d<\/li>\n<li>Click on the \u201c+ New Goal\u201d button<\/li>\n<li>Set the Goal description\n\n<ol>\n<li>Enter a name for the goal (I suggest \u201cContact Forms\u201d)<\/li>\n<li>Choose the \u201cEvent\u201d radio button and click \u201cContinue\u201d<\/li>\n<\/ol><\/li>\n<li>Set the Goal details\n\n<ol>\n<li>Set the \u201cCategory Equals to\u201d field to \u201cContact Form 7\u201d<\/li>\n<li>Set the \u201cAction Equals to\u201d field to the event you wish to track (<a href=\"https:\/\/wordpress.org\/plugins\/cf7-google-analytics\/#what%20events%20will%20be%20shown%3F\">see above<\/a> for a list of events)<\/li>\n<li>If you want to define goals for specific form, enter the name of your form in the \u201cLabel\u201d field<\/li>\n<li>Click the \u201cSave\u201d button<\/li>\n<\/ol><\/li>\n<\/ol><\/dd>\n<dt id='how%20do%20i%20use%20this%20with%20google%20tag%20manager%20%28gtm.js%29%3F'><h3>How do I use this with Google Tag Manager (gtm.js)?<\/h3><\/dt>\n<dd><ol>\n<li>In your Google Tag Manager workspace, add a new Trigger.\n\n<ol>\n<li>Choose trigger type: \u201cOther\/Custom Event\u201d<\/li>\n<li>Set \u201cEvent name\u201d to \u201cContact Form 7\u201d<\/li>\n<li>Set \u201cThis trigger fires on\u201d to \u201cSome Custom Events\u201d<\/li>\n<li>Set the dropdowns to \u201cEvent contains Contact Form 7\u201d\n\n<ul>\n<li><\/li>\n<\/ul><\/li>\n<li>Save the trigger<\/li>\n<\/ol><\/li>\n<li>In your Google Tag Manager workspace, add a new Tag.\n\n<ol>\n<li>Choose tag type: \u201cUniversal Analytics\u201d<\/li>\n<li>Change \u201cTrack Type\u201d to \u201cEvent\u201d<\/li>\n<li>Set \u201cCategory\u201d to \u201cContact Form 7\u201d<\/li>\n<li>Set \u201cLabel\u201d\u00a0to \u201c{{Event}}\u201d\n\n<ul>\n<li><\/li>\n<\/ul><\/li>\n<li>Click in the \u201cTriggering\u201d box and choose the trigger you set up above.<\/li>\n<\/ol><\/li>\n<li>Save and publish your changes.<\/li>\n<\/ol><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.8.12<\/h4>\n\n<ul>\n<li>Update tested-up-to version.<\/li>\n<\/ul>\n\n<h4>1.8.11<\/h4>\n\n<ul>\n<li>Update tested-up-to version.<\/li>\n<\/ul>\n\n<h4>1.8.10<\/h4>\n\n<ul>\n<li>Fix issue with minified JS<\/li>\n<\/ul>\n\n<h4>1.8.9<\/h4>\n\n<ul>\n<li>Fix undefined index issue in new installations<\/li>\n<\/ul>\n\n<h4>1.8.8<\/h4>\n\n<ul>\n<li>Update tested-up-to version and automatic deployment.<\/li>\n<\/ul>\n\n<h4>1.8.7<\/h4>\n\n<ul>\n<li>Fix typo in old tracking code for GTM.<\/li>\n<\/ul>\n\n<h4>1.8.6<\/h4>\n\n<ul>\n<li>Fix typo in upgrade notes.<\/li>\n<\/ul>\n\n<h4>1.8.5<\/h4>\n\n<ul>\n<li>Fix a bug with GTM and older CF7 versions.<\/li>\n<li>Drop \u201cContact Form\u201d event labels for some integrations, leaving just \u201cContact Form 7\u201d as the event label.<\/li>\n<\/ul>\n\n<h4>1.8.4<\/h4>\n\n<ul>\n<li>Fix a bug sending \u201cContact Form\u201d\u00a0instead of \u201cContact Form 7\u201d as the event label for certain configurations.<\/li>\n<\/ul>\n\n<h4>1.8.3<\/h4>\n\n<ul>\n<li>Fix a bug sending the form ID instead of name to Google Analytics.<\/li>\n<\/ul>\n\n<h4>1.8.2<\/h4>\n\n<ul>\n<li>Cache form titles and IDs for better performance.<\/li>\n<li>Remove 1.7.0 admin upgrade notices.<\/li>\n<\/ul>\n\n<h4>1.8.1<\/h4>\n\n<ul>\n<li>Fix a bug causing events not to send due to upgrade logic.<\/li>\n<li>Set default options if user has not selected events to send.<\/li>\n<\/ul>\n\n<h4>1.8.0<\/h4>\n\n<ul>\n<li>Add options to enable\/disable the available event actions.<\/li>\n<\/ul>\n\n<h4>1.7.5<\/h4>\n\n<ul>\n<li>Update readme with goal tracking instructions<\/li>\n<\/ul>\n\n<h4>1.7.4<\/h4>\n\n<ul>\n<li>Update readme with GDPR notes<\/li>\n<\/ul>\n\n<h4>1.7.3<\/h4>\n\n<ul>\n<li>Add <a href=\"https:\/\/github.com\/macbookandrew\/cf7-google-analytics#how-do-i-use-this-with-google-tag-manager-gtmjs\"><code>gtm.js<\/code> setup instructions<\/a><\/li>\n<li>Update plugin coding standards<\/li>\n<\/ul>\n\n<h4>1.7.2<\/h4>\n\n<ul>\n<li>Fix error with undefined constant<\/li>\n<\/ul>\n\n<h4>1.7.1<\/h4>\n\n<ul>\n<li>Fix error with admin notice on PHP &lt; 5.0<\/li>\n<\/ul>\n\n<h4>1.7.0<\/h4>\n\n<ul>\n<li>Add support for all CF7 DOM events. Please <a href=\"https:\/\/github.com\/macbookandrew\/cf7-google-analytics#what-events-will-be-shown\">see this note for more detail<\/a>.<\/li>\n<\/ul>\n\n<h4>1.6.1<\/h4>\n\n<ul>\n<li>Add support for PHP &lt; 5.3<\/li>\n<\/ul>\n\n<h4>1.6.0<\/h4>\n\n<ul>\n<li>Add support for Google Tag Manager<\/li>\n<\/ul>\n\n<h4>1.5.0<\/h4>\n\n<ul>\n<li>Add support for sending the Contact Form 7 form name instead of just the form ID<\/li>\n<\/ul>\n\n<h4>1.4.1<\/h4>\n\n<ul>\n<li>Update suppoprt for gtag.js custom events<\/li>\n<\/ul>\n\n<h4>1.4.0<\/h4>\n\n<ul>\n<li>Add support for the Global Site Tag (gtag.js)<\/li>\n<\/ul>\n\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Update to use new DOM events in Contact Form 7 v4.8<\/li>\n<\/ul>\n\n<h4>1.2.2<\/h4>\n\n<ul>\n<li>Fix JS issue if <code>ga<\/code> is undefined<\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>Fix PHP undefined index issue<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Fix issue where any manually-specified items were being deleted<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Add support for Google Analytics by Yoast<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>First stable version<\/li>\n<\/ul>","raw_excerpt":"Adds Google Analytics Event Tracking to all Contact Form 7 forms. Note: once you are using Google Analytics v4, this plugin may no longer be necessary &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/43461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/dsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/dsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=43461"}],"author":[{"embeddable":true,"href":"https:\/\/dsb.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/macbookandrew"}],"wp:attachment":[{"href":"https:\/\/dsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=43461"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/dsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=43461"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/dsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=43461"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/dsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=43461"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/dsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=43461"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/dsb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=43461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}