Google Analytics 4 Tracking in Sparkforge Workflows

By Sparkforge Support Team ·Last reviewed May 3, 2026

Sparkforge sends GA4 events through the Add to Google Analytics workflow action. You need a Measurement ID and API Secret from your GA4 Data Stream, then paste them into the workflow. Data takes 24-48 hours to appear in GA4.

The Add to Google Analytics workflow action handles both GA4 and Universal Analytics. Pick GA4 from the Action Type dropdown to send server-side events from Sparkforge into your GA4 property.

What you need

  • A GA4 property with at least one Data Stream
  • The Measurement ID from that Data Stream
  • An API Secret from the same Data Stream
  • A Sparkforge workflow with relevant triggers

Step 1: Add the GA action to a workflow

  1. Open or create a workflow in Sparkforge.
  2. Add the Add to Google Analytics action.
  3. Under Action Type, choose Google Analytics 4.

Step 2: Pull the Measurement ID

  1. In Google Analytics, go to Admin > Account Settings > Data Stream and pick the stream you want to track.
  2. Copy the Measurement ID (starts with G-).
  3. Paste it into the Measurement ID field on the workflow action.

Step 3: Name the event

Add the event name you want to track. It will show up alongside GA4's standard events. Stick to GA4's event naming rules — letters, numbers, and underscores only.

Optional: Event Value

The action supports an optional Event Value field for sending a number with the event (revenue, order total, score). Use a static number or pull from a workflow custom value. Leave it blank if you don't need it.

Step 4: Generate the API Secret

  1. Back in GA4, go to Admin > Account Settings > Data Stream and select your stream.
  2. Open Measurement Protocol API secrets.
  3. Acknowledge Google's privacy disclosures and click Create.
  4. Name the secret, click Create, and copy the Secret Value.
  5. Paste it into the API Secret field in the Sparkforge action.

Step 5: Save and publish

Save the action, save the workflow, then publish. Trim any leading or trailing spaces in the API Secret — extra whitespace breaks the call silently.

Data takes 24-48 hours to appear in GA4 after the workflow runs.

Frequently Asked Questions

How long until events show up in GA4?
Allow 24-48 hours after the workflow runs for events to appear in your Google Analytics 4 reports.
Can I use GA4 and Universal Analytics in the same workflow?
Yes. The Add to Google Analytics action supports both. Pick the version you want from the Action Type dropdown, or run two actions side by side.
Do I have to send an Event Value?
No. Event Value is optional. Use it when you want to attach a number to the event (revenue, order total). Leave it blank otherwise.
Why is my GA action failing?
Most failures come from extra whitespace in the API Secret. Re-copy the secret, paste it cleanly, and confirm the Measurement ID matches the right Data Stream.

Was this article helpful?