[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fPwsl3W6JntHvl-nsqluWBVQ8jIprwVr4TFSfdNrHLzE":3},{"slug":4,"display_name":5,"profile_url":6,"plugin_count":7,"total_installs":8,"avg_security_score":8,"avg_patch_time_days":9,"trust_score":10,"computed_at":11,"plugins":12},"kubawtf","Kuba Serafinowski","https:\u002F\u002Fprofiles.wordpress.org\u002Fkubawtf\u002F",1,100,30,94,"2026-04-05T02:06:34.116Z",[13],{"slug":14,"name":15,"version":16,"author":5,"author_profile":6,"description":17,"short_description":18,"active_installs":8,"downloaded":19,"rating":20,"num_ratings":20,"last_updated":21,"tested_up_to":22,"requires_at_least":23,"requires_php":24,"tags":25,"homepage":30,"download_link":31,"security_score":8,"vuln_count":20,"unpatched_count":20,"last_vuln_date":32,"fetched_at":33},"tracking-for-divi","Tracking for Divi","1.1.1","\u003Cp>Ever wanted to track the built-in contact form from Divi? If you tried using Google Tag Manager’s built-in form submit events to do it you probably noticed an inflated number of events flowing.\u003C\u002Fp>\n\u003Cp>This is because the form submission event is triggered even if there are form validation errors or the server returns another error.\u003C\u002Fp>\n\u003Cp>Since Divi doesn’t provide any JavaScript events to hook into there is no straightforward way to find out if a message has actually been sent.\u003C\u002Fp>\n\u003Cp>To get around this, this plugin listens to the network communication that is happening underneath. It’s based on the same mechanism Divi itself uses.\u003C\u002Fp>\n\u003Cp>There are three options now:\u003C\u002Fp>\n\u003Col>\n\u003Cli>a \u003Ca href=\"https:\u002F\u002Fdevelopers.google.com\u002Ftag-platform\u002Ftag-manager\u002Fdatalayer\" rel=\"nofollow ugc\">dataLayer\u003C\u002Fa> event\u003C\u002Fli>\n\u003Cli>a \u003Ca href=\"https:\u002F\u002Fsupport.google.com\u002Fanalytics\u002Fanswer\u002F12229021\" rel=\"nofollow ugc\">Google Analytics 4 event\u003C\u002Fa> (using gtag.js)\u003C\u002Fli>\n\u003Cli>a \u003Ca href=\"https:\u002F\u002Fsupport.google.com\u002Fgoogle-ads\u002Fanswer\u002F1722022\" rel=\"nofollow ugc\">Google Ads conversion\u003C\u002Fa> (also using gtag.js)\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>You can use either one of them or event all of them together.\u003C\u002Fp>\n\u003Cp>You’ll be able to customize the dataLayer variable if you’re \u003Ca href=\"https:\u002F\u002Fdevelopers.google.com\u002Ftag-platform\u002Ftag-manager\u002Fdatalayer#rename_the_data_layer\" rel=\"nofollow ugc\">not using the standard naming\u003C\u002Fa>, and the event names, separately for dataLayer and gtag.\u003C\u002Fp>\n\u003Ch4>Data layer reporting\u003C\u002Fh4>\n\u003Cp>The structure of the object pushed to the dataLayer is the following, with the default naming:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>{\n  event: \"contact_form_submit\",\n  formId: string,\n  postId: number,\n  formData: {\n    name: string,\n    email: string,\n    message: string,\n  },\n  allFormData?: Record\u003Cstring, unknown>, \u002F\u002F when \"Include all form data\" is enabled\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>It’s up to you to use or discard the form data.\u003C\u002Fp>\n\u003Ch4>Google Analytics 4 reporting\u003C\u002Fh4>\n\u003Cp>The Google Analytics event is sent with flattened parameters:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>gtag(\n  \"event\",\n  \"contact_form_submit\",\n  {\n    form_id: \"divi\u002Fcontact-form-0\",\n    name: \"John\",\n    email: \"john@example.com\",\n    message: \"Hello\",\n    \u002F\u002F additional fields when \"Include all form data\" is enabled\n  }\n);\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Form data (name, email, message) is included by default. When “Include all form data” is enabled, all form fields are flattened into the event parameters.\u003C\u002Fp>\n\u003Cp>\u003Cem>This will only work if you have a \u003Ca href=\"https:\u002F\u002Fsupport.google.com\u002Fgoogle-ads\u002Fanswer\u002F11994839\" rel=\"nofollow ugc\">Google Tag\u003C\u002Fa> already deployed on the website i.e. the \u003Ccode>gtag()\u003C\u002Fcode> function is available.\u003C\u002Fem> Otherwise, you will see a warning in your console like this:\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>Tracking for Divi: gtag event failed, gtag is not defined\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Ch4>Google Ads conversion reporting\u003C\u002Fh4>\n\u003Cp>The Google Ads conversion is sent like so:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>gtag(\n  \"event\",\n  \"conversion\",\n  {\n    send_to: \"\u003Cconversion_id>\u002F\u003Cconversion_label>\",\n  }\n);\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>There is no default for \u003Ccode>conversion_id\u003C\u002Fcode> and \u003Ccode>conversion_label\u003C\u002Fcode> as they are always created individually in Google Ads.\u003C\u002Fp>\n\u003Cp>\u003Cem>This will only work if you have a \u003Ca href=\"https:\u002F\u002Fsupport.google.com\u002Fgoogle-ads\u002Fanswer\u002F11994839\" rel=\"nofollow ugc\">Google Tag\u003C\u002Fa> already deployed on the website i.e. the \u003Ccode>gtag()\u003C\u002Fcode> function is available.\u003C\u002Fem> Otherwise, you will see a warning in your console like this:\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>Tracking for Divi: Google Ads conversion event failed, gtag is not defined\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Cp>\u003Cstrong>Note:\u003C\u002Fstrong> This plugin hasn’t been thoroughly tested with Divi forms that redirect to a success page. The tracking works just as well, however the redirect could interrupt the tracking flow e.g. if Google Tag Manager has a lot of logic and doesn’t trigger the tags in time. The tags themselves these days \u003Ca href=\"https:\u002F\u002Fsupport.google.com\u002Fanalytics\u002Fanswer\u002F9964640#event-batching\" rel=\"nofollow ugc\">use the beacon API\u003C\u002Fa> (see \u003Ca href=\"https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FBeacon_API\" rel=\"nofollow ugc\">MDN\u003C\u002Fa> for reference) so the requests shouldn’t be interrupted as long as they are fired before website unload.\u003C\u002Fp>\n","Track successful Divi contact form submissions with dataLayer events, Google Analytics, and Google Ads conversions.",209,0,"2026-03-04T19:33:00.000Z","6.9.4","5.3","7.4",[26,27,28,29],"datalayer","divi","tag-manager","tracking","https:\u002F\u002Fgithub.com\u002Fzizzfizzix\u002Ftracking-for-divi","https:\u002F\u002Fdownloads.wordpress.org\u002Fplugin\u002Ftracking-for-divi.1.1.1.zip",null,"2026-03-15T15:16:48.613Z"]