Request for Form Submission Tracking Integration

  • Profile Image
    Raval_Shital
    Asked on September 25, 2025 at 4:15 AM

    Hello,

    We are using your form for one of our projects:

    https://alteregorunning.com/pages/ambassador-application-2026

    We would like to implement tracking so that the Ambassador Application Form submission data is pushed to the dataLayer when someone submits the form. Since the form is embedded in an iframe, we are unsure how to capture the submission event and pass it to the dataLayer.

    Could you please assist us with this integration?

    Thank you,

    Shital Raval

  • Profile Image
    Podo: Support AI Agent
    Replied on September 25, 2025 at 4:15 AM

    Hi Shital,

    Thanks for reaching out to Jotform Support. I'm an AI assistant here to assist you.

    Regarding your request to implement tracking for the Ambassador Application Form submission data pushed to the dataLayer, especially since the form is embedded in an iframe, here is some guidance:

    Tracking form submissions within an iframe can be challenging because the iframe content is isolated from the parent page. To capture the submission event and push data to the dataLayer, you typically need to use postMessage communication between the iframe and the parent page.

    Unfortunately, Jotform does not provide a direct built-in feature for pushing submission data to the dataLayer from an iframe embed. However, you can explore these options:

    • Use Jotform's webhook feature to send submission data to your server or a script that then pushes the data to the dataLayer.
    • Use the full source code embed of the form instead of iframe embed, which allows more control over the form and JavaScript events.
    • Implement a custom script on the parent page that listens for postMessage events from the iframe if you can modify the iframe content to send such messages.

    For more detailed tracking like Facebook Pixel, Jotform provides a widget to add Facebook Pixel tracking directly to your form, which might be helpful if you are using Facebook Pixel for tracking.

    If you need further assistance with a specific tracking setup or integration, please provide more details about your tracking platform or tools.

    Let us know if you have any other questions.

  • Profile Image
    Ertugrul
    Replied on September 25, 2025 at 4:33 AM

    Hi Shital,

    Thanks for reaching out to Jotform Support. The cleanest, cross-domain-safe way to push a submission event into your site’s dataLayer is to use a Thank You redirect back to your domain and fire the event there (instead of inside the Jotform iFrame).

    1. Form → Thank You redirect: In Form Builder go to Settings → Thank You Page → Redirect to an external link and point it to a thank-you URL on your site (e.g., /pages/ambassador-application-2026/thank-you). You can also enable Redirect with HTTP POST if you want to receive submission data server-side.Request for Form Submission Tracking Integration Image 1 Screenshot 30Request for Form Submission Tracking Integration Image 2 Screenshot 41
    2. (Optional) Pass a submission ID: Append ?sid={id} to the redirect URL so GTM can read a non-PII identifier.
    3. On your thank-you page: push a custom event:
    <script>
      window.dataLayer = window.dataLayer || [];
      dataLayer.push({
        event: 'jotform_submit',
        formTitle: 'Ambassador Application 2026',
        submissionId: new URLSearchParams(location.search).get('sid')
      });
    </script>

    In GTM, trigger your GA4/Ads tags on the Custom Event jotform_submit.

    Give it a try and let us know how it goes.

  • Profile Image
    Raval_Shital
    Replied on September 25, 2025 at 4:38 AM

    Hey Ertugrul,

    I’m not sure — will it capture every single piece of data that was submitted through the form on the previous page?

  • Profile Image
    Ertugrul
    Replied on September 25, 2025 at 4:49 AM

    Hi Shital,

    Thanks for reaching out to Jotform Support. Short answer: yes. If you use a server-side flow.

    The iFrame page itself can’t read all field values (cross-domain), but when you enable Thank You → Redirect with “HTTP POST data” to your own endpoint, your endpoint receives the entire submission payload (every field). From there, you can render your thank-you page and push a sanitized event to the dataLayer (e.g., event, formTitle, submissionId, and any non-PII fields you choose).

    If your site can’t accept a POST (some CMS pages can’t), use a Webhook (or Zapier/Make) to capture the full payload server-side, and do a normal redirect to your on-site thank-you page. On that page, fire a dataLayer.push({ event: 'jotform_submit', submissionId: '...' }). You’ll still have the full data from the webhook; the front end only needs minimal identifiers.

    If you truly need to pass fields purely on the client, you can append selected answers as URL parameters in the redirect, but that’s limited by URL length and not recommended for sensitive/long text.

    Give it a try and let us know how it goes.

  • Profile Image
    Raval_Shital
    Replied on September 25, 2025 at 6:32 AM

    Hii ,
    Can't we just get the data here? It's working, but since no data is being captured, it doesn't fulfill our requirement.


    <script>

    (function() {

     window.addEventListener("message", function(event) {

      // Only accept messages from JotForm

      if (event.origin.indexOf("jotform.com") === -1) return;

      let data;

      try {

    data = {}; // map data

      } catch (e) {

       return; // Not valid JSON, ignore

      }

      if (!data || !data.event) return;

      // Push events to GTM dataLayer

      window.dataLayer = window.dataLayer || [];

      window.dataLayer.push({

       event: "jotformEvent",

       jotformEventType: data.event, // e.g. "form-submit"

       formID: data.formID || undefined,

       formTitle: data.formTitle || undefined,

       page: data.page || undefined

      });

      console.log("JotForm Event pushed:", data);

     }, false);

    })();

    </script>


  • Profile Image
    Ertugrul
    Replied on September 25, 2025 at 7:39 AM

    Hi Shital,

    Thanks for reaching out to Jotform Support. I've forwarded your issue to my team. We'll get back to you as soon as possible. Thank you for your understanding and patience.

  • Profile Image
    Raval_Shital
    Replied on September 26, 2025 at 1:02 AM

    Hey Ertugrul
    Is there any update on it?

    Is it possible for you to just add this script on form submit?

    window.dataLayer = window.dataLayer || [];

       window.dataLayer.push({

        event: "ambassadorFormSubmit",

        formData: submissionData

       });

    where submissionData will contains all submitted values?


  • Profile Image
    Kris Ann JotForm Support
    Replied on September 26, 2025 at 1:57 AM

    Hi Shital,

    Thanks for bearing with us. Our Developers are still working on this, I will also forward your question to them, and we’ll keep you posted on any progress.

Your Reply