Skip to main content

GA4 Integration

Send conversion events to Google Analytics 4 using the Measurement Protocol. TrolleyShield fires custom events when calls and form submissions are analyzed, giving you visibility into lead quality directly in GA4.

Requirements

  • Call Pro or Call Agency plan
  • A GA4 property with a Measurement Protocol API secret

Setup

1. Get Your GA4 Credentials

  1. Go to your GA4 property in Google Analytics
  2. Navigate to Admin → Data Streams → (your stream)
  3. Copy the Measurement ID (starts with G-)
  4. Under Measurement Protocol API secrets, create a new secret and copy it

2. Configure in TrolleyShield

  1. Go to Settings → Integrations in the TrolleyShield dashboard
  2. Find the Google Analytics section
  3. Enter your Measurement ID (e.g., G-XXXXXXXXXX)
  4. Enter your API Secret
  5. Save

Events Sent

TrolleyShield sends four custom event types to GA4:

call_lead

Fired when a call is analyzed with a classifiable intent.

ParameterTypeDescription
call_intentstringqualified_lead, general_inquiry, existing_customer, spam, wrong_number, job_seeker, vendor, or incomplete
call_confidencenumberAI confidence score (0-100)
call_duration_secondsnumberCall duration
call_sourcestringWhere the call originated
caller_citystringCaller's city
caller_statestringCaller's state
is_first_time_callerbooleanWhether this is a new caller
lead_scorenumberNumeric score: high=100, medium=70, existing=50, low=30

call_conversion

Fired when a high-intent call triggers a conversion.

ParameterTypeDescription
valuenumberConversion value (if set)
currencystringCurrency code (default: USD)
call_sourcestringCall origin

form_lead

Fired when a form submission is analyzed as legitimate or suspicious.

ParameterTypeDescription
form_intentstringlegitimate or suspicious
form_confidencenumberAI confidence score (0-100)
behavioral_scorenumberClient-side behavioral score
site_urlstringWebsite URL
form_idstringForm identifier
lead_scorenumberNumeric score: legitimate=100, suspicious=30

form_spam_blocked

Fired when a form submission is classified as spam or bot.

ParameterTypeDescription
spam_typestringsuspicious or bot_detected
site_urlstringWebsite URL

Viewing Events in GA4

Events appear in GA4 within 24 hours of being sent. You can find them under:

  • Reports → Realtime (for recent events)
  • Reports → Engagement → Events (for historical data)
  • Explore (for custom reports and funnels)
tip

Create custom GA4 audiences based on call_lead and form_lead events to build remarketing lists of high-intent visitors.

Troubleshooting

Events Not Appearing

  • GA4 Measurement Protocol events can take up to 24 hours to appear in standard reports (Realtime is faster)
  • Verify your Measurement ID and API Secret are correct in Settings
  • The Measurement Protocol returns 204 No Content even for invalid payloads — a successful response doesn't guarantee the event was processed

Server-Side Client IDs

Since TrolleyShield fires events server-side, a generated client_id is used instead of the visitor's GA4 cookie. This means these events may not be stitched to the same user session in GA4 unless you're using User-ID or other identity resolution.