Skip to content
Default help center home
Default help center home

Integrating your Default forms with GTM and Google analytics

This solution applies when you redirect users directly to a Default Forms link, meaning the form is hosted on forms.default.com and is not embedded within your website. In this setup, users are interacting with the form on the Default Forms domain, so cross-domain tracking is required to ensure seamless event tracking between your website and the Default form.

Steps to Configure

  1. Add Your GTM ID to Default Forms

    • Follow this link for the GTM Integration Documentation.

    • Add your GTM ID in the GTM integration settings within Default Forms.

  2. Configure Cross-Domain Tracking in Google Analytics (GA4)

    • In Google Analytics:

      • Navigate to Admin → Data Streams → [Your Data Stream].

      • Select Tag Settings → Configure Your Domains.

      • Add forms.default.com as a domain under Cross-Domain Linking to allow smooth tracking between your website and the form.

  3. Set Up a Google Tag in Google Tag Manager (GTM)

    • In GTM:

      • Go to Tags → New → Google Tag.

      • Add your Google Tag ID (find it under GA → Admin → Data Streams).

      • In the tag configuration, ensure send_page_view is set to true.

      • Set the trigger to All Pages.

        • (Optional): Restrict this tag to fire only for the forms.default.com domain if you already have a Google Tag for your main website's page views.

  4. Create a GA4 Event for Default Forms Activity

    • In GTM:

      • Create a GA4 Event.

      • Configure it to fire on a default event in the form (e.g., form submission or page load).

      • Verify the event is properly tracked in Google Analytics.


Solution 2: Embedding Forms via Iframes in Your Website

This solution is for cases when you embed Default Forms on your website using iframes. The Default form is loaded inside an iframe on your page, and user interaction occurs within the embedded form. To track these events accurately, the GTM script must be present on the parent website.

Steps to Configure

  1. Ensure GTM is Set on the Parent Website

    • Add the GTM script to the parent website’s head tag (the website where the form is embedded).

    • There is no need to configure GTM within Default Forms for embedded forms.

  2. Add the Default gtm script on your website

    <script type="text/javascript" src="https://import-cdn.default.com/gtm.js" async></script>
    • Using GTM:

      • Go to Tags → New → Custom HTML.

      • Paste the provided Default Forms script for embedding.

      • Set the Trigger to Fire on All Pages in GTM:

    • Directly in your head tag

  3. Create a GA4 Event for Default Forms Activity

    • In GTM:

      • Create a GA4 Event to track relevant form activities.

      • Configure it to fire on a default event (e.g., form submission or interaction) within the form.

      • Ensure the event is correctly sent to Google Analytics for monitoring.