Nimbata’s GA4 integration sends call data as events directly to your GA4 property via the Measurement Protocol, helping you understand which traffic sources and campaigns drive phone leads. It can also send the form submissions Nimbata captures with form tracking. Server-side tracking sends Nimbata call events from a secure server (your Google Tag Manager Server container) to GA4, bypassing ad-blockers and browser privacy restrictions.

Connect GA4

Tip

This section assumes you have a working GA4 property and a web data stream configured. If not, review Google’s GA4 setup guide before proceeding.

Note

The integration is configured at the project level. Make sure you’re editing the correct project before proceeding.

  1. Connect Nimbata to GA4

    Google Analytics

    Add call conversions to Google Analytics and find out where your true leads are.

    Tracking setup

    Applies to all events below.

    Tracking Method
    Client-Side1
    Measurement ID
    G-XXXXXXXXXX
    GA4 API Key
    API secret
    Choose the Tracking Method (1), then fill in the fields beside it.

    For Client-Side tracking, enter your Measurement ID and, in GA4 API Key, your GA4 Measurement Protocol API secret. Both are found in your GA4 account under Admin > Data collection and modification > Data Streams > [your stream] > Web Stream Details:

    • Measurement ID: listed under Stream Details (format: G-XXXXXXXXXX).
    • API secret: found under Events > Measurement Protocol API secrets. Click Create if you don’t already have one.

    For Server-Side tracking (sGTM), enter your sGTM Server URL, sGTM Activation Path, and Measurement ID:

    • sGTM Server URL: the custom domain mapped to your sGTM container (for example, https://sgtm.yourdomain.com). Find it in Google Tag Manager under your Server container > Admin > Container Settings > Server container URLs.
    • sGTM Activation Path: the endpoint path you configured on your GA4 Measurement Protocol client inside the sGTM container (commonly /mp/collect). Find it in your Server container > Clients > [your GA4 MP client] > Request path.
    • Measurement ID: same as above, from your GA4 web stream under Admin > Data Streams > [your stream] > Stream Details.
  2. Select the call events to send

    • Make sure your credentials are saved.
    • Choose which call events Nimbata should send to GA4. Each event has its name at the top of its card.
    • Click Add event (1) to add multiple events, for example All Calls, Answered Calls, or First-time Callers.
    Callnimbata_callGoogle Analytics Call Event✕
    Type of data to send
    Call2FormSMS

    Event parameters

    Select the data included in each Google Analytics event.

    3 mapped
    Event parameter nameValue
    call_start_timeStart Time
    ✕
    campaignUTM Campaign
    ✕
    recording_linkRecording Link
    ✕
    Add event parameter
    Formnimbata_formReady✕
    Add event (1) adds an event. Each event has its Type of data to send (2) and its Event parameters.

    Tip

    Use a distinct event name for each to avoid duplicate or overlapping data in GA4.

    • To send form submissions instead of calls, add an event and set Type of data to send to Form. A Form event is sent by workflows that start on a form trigger, such as Form submitted.
    • You can optionally attach extra parameters to each event (for example Start Time, Campaign, Recording Link) by selecting them and assigning a name.
    • These appear as event parameters in GA4 and may need to be registered there before they show in reports.

    Detailed guide: Full list of available call event parameters

  3. Activate the integration

    • Once your Measurement ID and API secret are in place, the panel at the top of the page reads Not used in any workflows.
    • Click + Create (1) in that panel. Nimbata opens a new workflow from the Google Analytics template, with a Call Ends trigger and a Google Analytics action. Pick the event to send in the action, then click Enable.

    Google Analytics

    Add call conversions to Google Analytics and find out where your true leads are.

    Not used in any workflows

    Create a workflow to start sending events to this integration.

    Manage workflows+ Create1
    Click + Create (1) in the workflow panel.
    Google Analytics Call EventWorkflow is valid.
    Disable
    Trigger Enrollment
    Inbound CallOutbound CallForm SubmissionSMS Received
    A customer calls your tracking number
    Fires whenCall StartsCall EndsUser Updates Property
    Action group1
    Google Analyticsnimbata_call✕
    Add another action
    Finish
    The workflow Nimbata creates sends the nimbata_call event after each inbound call.
  4. Confirm the integration is live

    • Return to the GA4 integration page.
    • The panel at the top should read Used in 1 workflow (1), with Events are sent when an inbound call ends.

    Google Analytics

    Add call conversions to Google Analytics and find out where your true leads are.

    Used in 1 workflow

    Events are sent when an inbound call ends.

    Manage workflows+ Create
    1
    Used in 1 workflow (1): the integration is live.

🎉 That’s it! Your call events appear in GA4 under Events or Conversions, depending on how they are configured. Allow some time for GA4 to process incoming data after the integration goes live.

Detailed guide: Import call events from GA4

Server-side tracking

Note

This section assumes you already have a Google Tag Manager Server container (sGTM) provisioned and running. If you haven’t set that up yet, follow Google’s official sGTM setup guide before continuing.

Server-side tracking sends Nimbata call events directly from a secure server to Google Analytics 4, bypassing ad-blockers and browser privacy restrictions that would otherwise intercept or drop the data. This section walks through the full configuration in both Nimbata and Google Tag Manager.

Configure Nimbata

  1. Open the Google Analytics integration

    • Go to Integrations in the left-hand menu.
    • Under Tracking Method, select Server-Side (sGTM) (1).
    Tracking setup

    Applies to all events below.

    Tracking Method
    Server-Side (sGTM)1
    Measurement ID
    G-XXXXXXXXXX
    sGTM Server URL
    https://gtm.yourdomain.com
    sGTM Activation Path
    /mp/collect
    Choose Server-Side (sGTM) (1): the sGTM fields replace the GA4 API Key.
  2. Enter your sGTM Server URL

    • In Google Tag Manager, go to Admin > Container Settings.
    • Copy the Server container URL.
    • Paste it into the sGTM Server URL field in Nimbata.

    The Tag Manager Admin tab of a server container, with Container Settings marked.

    Container Settings with the Server container URLs field marked.

  3. Enter your Measurement ID

    • In Google Analytics 4, go to Admin > Data Streams and select your stream.
    • Copy the Measurement ID (format: G-XXXXXXXXXX).
    • Paste it into the Measurement ID field in Nimbata.

    Tip

    Leave the sGTM Activation Path field empty for now. You fill it in when you set the Activation Path, in the next part.

Create the GA4 Measurement Protocol client in sGTM

This client is the entry point for Nimbata’s server-side requests into your sGTM container.

  1. Create a new client

    • In Google Tag Manager, go to Clients and click New.
    • Set the client type to Measurement Protocol (GA4).
  2. Set the Activation Path

    • Add an Activation Path (for example: /nimbata).
    • Copy the value.
    • Paste it into the sGTM Activation Path field in Nimbata.

    A client named GA4 MP with Client Type Measurement Protocol (GA4) and the Activation Path /mp/collect.

Your Nimbata setup should now look like this:

Google Analytics

Add call conversions to Google Analytics and find out where your true leads are.

Used in 1 workflow

Events are sent when an inbound call ends.

Manage workflows+ Create
Tracking setup

Applies to all events below.

Tracking Method
Server-Side (sGTM)
Measurement ID
G-HP4RB0RP1N
sGTM Server URL
https://gtm.harborpine.example
sGTM Activation Path
/mp/collect
The finished server-side setup: Server-Side (sGTM) with all three fields filled in.

Warning

The Activation Path must match exactly between Nimbata and your GTM client, including any leading slash.

Create the fpid transformation

This transformation adds a first-party client ID to incoming events, ensuring accurate user stitching across sessions.

Note

The transformation’s Value uses the v - Incoming Client ID variable, which you create in Create four user-defined variables below. Create that variable first, or come back to this step once it exists.

  1. Add a new transformation

    • In your sGTM container, go to Transformations and click New.
    • Configure it as follows:
    Field Value
    Transformation Name fpid_transformation
    Transformation Type Augment event
    Name first_party_id
    Value {{v - Incoming Client ID}}
    Matching condition {{Client Name}} equals GA4 MP

    The fpid_transformation: Augment event, first_party_id set to the v - Incoming Client ID variable, a Client Name matching condition, and All Tags affected.

    Tip

    Use whatever name you gave your client (in Create a new client) as the matching condition value. The screenshot uses matches RegEx GA4|GA4 MP instead, which also covers a standard GA4 client; either works for the Nimbata client.

Create a custom variable template

Before creating your variables, you need a custom template to cleanly extract the real visitor IP from the X-Forwarded-For header.

  1. Create the template

    • In Google Tag Manager, go to Templates and click New Variable Template.
    • Name it: Clean X-Forwarded-For.
    • Add a field named headerValue.
    • Paste the following into the code editor:
    const headerValue = data.headerValue;
    
    if (!headerValue) {
      return undefined;
    }
    
    let raw = headerValue.trim();
    if (!raw) {
      return undefined;
    }
    
    let first = raw.split(',')[0];
    if (!first) {
      return undefined;
    }
    
    first = first.trim();
    
    if (first.charAt(0) === '[') {
      const closingBracket = first.indexOf(']');
      if (closingBracket > 0) {
        first = first.substring(1, closingBracket);
      }
    } else {
      const colonCount = first.split(':').length - 1;
      if (colonCount === 1 && first.indexOf('.') > -1) {
        first = first.split(':')[0].trim();
      }
    }
    
    first = first.trim();
    
    return first || undefined;
    • Save the template.

Create four user-defined variables

Create these variables in the order listed. Variable 4 (clean - ip_override from xff) uses the template from the previous part and reads variable 3 (h - X-Forwarded-For), so create it last.

  1. v - Incoming Client ID

    • Go to Variables and click New under User-Defined Variables.
    • Configure as follows:
    Field Value
    Variable Type Event Data
    Key path client_id

    The v - Incoming Client ID variable: Event Data with Key Path client_id, referenced by fpid_transformation.

  2. h - User-Agent

    • Click New and configure as follows:
    Field Value
    Variable Type Request Header
    Name User-Agent

    The h - User-Agent variable: Request Header with Name User-Agent, referenced by Tag - GA4.

  3. h - X-Forwarded-For

    • Click New and configure as follows:
    Field Value
    Variable Type Request Header
    Name X-Forwarded-For

    The h - X-Forwarded-For variable: Request Header with Name X-Forwarded-For, referenced by clean - ip_override from xff.

  4. clean - ip_override from xff

    • Click New and configure as follows:
    Field Value
    Variable Type Clean X-Forwarded-For
    headerValue {{h - X-Forwarded-For}}

    The clean - ip_override from xff variable: Clean X-Forwarded-For with the h - X-Forwarded-For variable as Header Value, referenced by Tag - GA4.

Update your GA4 tag

  1. Add parameters and apply the transformation

    • In your sGTM container, open your existing GA4 tag.
    • Under Parameters, add the following:
    Parameter Name Value
    ip_override {{clean - ip_override from xff}}
    user_agent {{h - User-Agent}}
    • Under Transformations, apply fpid_transformation.

    Tag - GA4 with the ip_override and user_agent parameters, an All Events trigger, and fpid_transformation attached.

Configure the Conversion Linker tag

  1. Edit or create the Conversion Linker tag

    • Open or create the Conversion Linker tag in your sGTM container.
    • Set the trigger to fire on all events (or all pages, depending on your setup).
    • Save and publish your container.

    Tag - Conversion Linker with an All Events trigger and fpid_transformation attached.

🎉 Nimbata now sends call events directly to your sGTM container. Each event is enriched with first-party ID and device data, then forwarded to GA4, bypassing ad-blockers and browser restrictions entirely. Make a test call to confirm the event appears in your GA4 real-time view.

Detailed guide: Number types and channels
Detailed guide: How to connect Nimbata to Google Analytics 4

Fix low attribution in GA4

If fewer calls than expected are showing source, medium, or campaign data in GA4, you have one of two problems:

Capture gap

  • Nimbata swapped the number but couldn’t read the visitor’s session data.
  • Usually a cookie consent manager.

Integration gap

  • Nimbata captured full session data, but it never reached GA4.
  • Usually a Client ID or workflow misconfiguration.

They look the same on the surface but require different fixes. Diagnose which one you have first.

Check Nimbata’s attribution data

  • Go to Activity > Calls.
  • Open an unattributed call.
  • Check the Attribution section of the call record.

Source and medium are populated: data was captured but didn’t reach GA4.
This is an integration gap. Go to Section A.

Source and medium are empty: session data was never captured.
This is a capture gap. Go to Section B.

Section A. Integration gap: call data not reaching GA4

A1. Verify your GA4 credentials

  • Go to Integrations > Google Analytics in Nimbata.
  • Confirm the Measurement ID (format: G-XXXXXXXXXX) matches exactly the one in GA4 under Admin > Data collection and modification > Data streams > [your stream] > Stream details.
  • Confirm the API secret comes from Measurement Protocol API secrets on that same screen, not a Tag Manager token or any other credential.
  • Confirm the panel at the top of the page shows Used in 1 workflow (or more), not Not used in any workflows.

Tip

A single mismatched character in either field silently blocks all events from sending.

A2. Check whether the Google Client ID is being transmitted

Nimbata links call events to GA4 sessions using the visitor’s _ga cookie. If it isn’t captured at call time, GA4 can’t match the event to a session, even if source and medium are correct in Nimbata.

  • In Activity › Calls, add the GA CID column to your view (Edit columns) and check it for your recent calls.
  • If it’s blank on calls that do have source and medium, the Client ID handshake is broken. Nimbata still sends those events, with a random client ID, so GA4 counts them without linking them to the visitor’s session.

Common causes: the Nimbata script loads before GA4’s gtag.js initializes, the _ga cookie is blocked by a consent manager, or a GTM error is preventing the GA4 tag from firing.

Fix: in GTM, set your GA4 configuration tag to fire on All Pages with no conditions, and ensure the Nimbata tag fires after it.

A3. Check your workflow configuration

  • Go to Workflows.
  • Open the workflow driving your GA4 integration.
  • Trigger: must be set to Call ends, not Call starts. At call start, duration is 0, so any duration filter fails.
  • Filters: check every condition. A common silent blocker is Recording = Yes: if a caller presses the privacy opt-out digit, recording stops and this filter fails. Replace it with Duration > X seconds instead.
  • Status: confirm the workflow is enabled and showing as running.

A4. Check for GA4-side data filters

  • In GA4, go to Admin > Data filters.
  • Confirm no filter is excluding events sent via the Measurement Protocol.

Section B. Capture gap: session data missing at the point of the call

This is the most common cause, especially in markets with low opt-in rates (Germany, Sweden, France, Poland). The pattern: DNI is working and numbers swap when tested, but a high percentage of calls from a specific market show no attribution.

To confirm:

  • Open the affected site in a fresh browser session without accepting the cookie banner.
  • Call the tracking number and check the resulting call record in Nimbata.
  • If source and medium are blank, repeat the test after accepting cookies.
  • If attribution appears after accepting, the consent manager is the cause.

Fix: review how your consent manager categorizes the Nimbata script and GA4 tag. If compliant with your privacy policy, moving Nimbata to a Functional or Necessary category resolves this. Ensure the GA4 tag fires before Nimbata even in consent-pending mode, so the _ga cookie is set first.

Warning

Consult your legal team before changing cookie categorization.

B2. Check the script load order

Even without a consent manager, if Nimbata fires before GA4 it cannot read the _ga cookie.

  • Open F12 > Network.
  • Reload the page.
  • Confirm the GA4 tag fires before the Nimbata script.
  • In GTM, add a trigger dependency or sequence the Nimbata tag after GA4.
  • In manual installs, place the Nimbata script tag below the GA4 tag.

B3. Check that your swap group source matches your traffic

  • A Google Ads swap group only swaps for visitors with a gclid parameter. Calls from other channels won’t have campaign attribution.
  • An All Visitors swap group swaps for everyone but shows many calls as direct or organic.

Confirm your swap group sources match your attribution expectations.

Realistic attribution benchmarks

  • 60 to 80% is typical for single-market setups with moderate consent rates.
  • Below 50% usually indicates a fixable technical issue covered in this section.
  • Near 0% in one market with a working setup elsewhere is almost always a consent manager or script load order issue.

Detailed guide: Connect GA4
Detailed guide: Import call events from GA4
Detailed guide: Create a workflow
Troubleshooting: Numbers not swapping