Skip to main content

ConvertKit Form GTM Event Listener

Track ConvertKit form submissions in Google Tag Manager. Capture convertKitFormId and convertkitUserId and fire GA4 events on converkitform.submit.

convertkitemail-marketingformsgtmga4lead-generation

Event fired

converkitform.submit

Key variable

convertKitFormId

ConvertKit

Overview

ConvertKit is an email marketing platform popular with creators and bloggers. Its embedded subscription forms use data-sv-form and data-uid HTML attributes. This listener uses a document-level submit event listener to detect ConvertKit form submissions and push them to the dataLayer.

Event fired: converkitform.submit Variables: convertKitFormId, convertkitUserId

Why Use This Listener

ConvertKit forms do not natively push to the dataLayer. Without this listener, email subscriber sign-ups are invisible to GTM, meaning you can't fire Google Ads or Meta pixels on newsletter sign-ups, or track them in GA4.

Common Use Cases

  • Track newsletter subscriber sign-ups as GA4 conversions
  • Fire Google Ads RLSA audiences on ConvertKit form submitters
  • Measure which content pieces drive the most sign-ups (via page URL + form ID)
  • Connect sign-up events to downstream revenue in GA4

Installation

html
<!-- GTM Custom HTML Tag: ConvertKit Form Listener -->
<script>
(function() {
  document.addEventListener('submit', function(a) {
    if (a.target.getAttribute('data-sv-form')) {
      window.dataLayer = window.dataLayer || [];
      window.dataLayer.push({
        'event': 'converkitform.submit',
        'convertKitFormId': a.target.getAttribute('data-sv-form'),
        'convertkitUserId': a.target.getAttribute('data-uid')
      });
    }
  }, true);
})();
</script>

Fire on: All Pages (Pageview). Uses capture phase (true as third argument) for reliable detection.

Data Layer Output

json
{
  "event": "converkitform.submit",
  "convertKitFormId": "1234567",
  "convertkitUserId": "abcdef12"
}

Trigger Configuration

Trigger Type: Custom Event Event Name: converkitform.submit

Note: GTM event names with dots are supported, use the exact string converkitform.submit.

Variables to Capture

Variable NameDL KeyExample
DLV – CK Form IDconvertKitFormId"1234567"
DLV – CK User IDconvertkitUserId"abcdef12"

GA4 Mapping

GA4 EventParameterValue
sign_upmethod"convertkit"
sign_upform_idDLV – CK Form ID
generate_leadform_idDLV – CK Form ID

Debugging

ProblemCauseFix
Event not firingConvertKit using popup embedPopup forms may use different event method
convertKitFormId nullNon-CK form capturedThe data-sv-form check filters correctly

Best Practices

  1. Always capture convertKitFormId, you may have multiple CK forms on different pages
  2. Use GA4's sign_up event (not generate_lead) for newsletter subscriptions, aligns with GA4 taxonomy
  3. Pass the Page URL as a parameter to identify which content drives sign-ups

Related Listeners