Skip to content

[sGTM Android] Events registered in GA4 but sGTM uploader returns count: 0 in SCION_UPLOAD #7843

@denniszwier

Description

@denniszwier

Environment

  • Android Studio version: Android Studio Otter 3 Feature Drop | 2025.2.3
  • Firebase Component: Analytics / GA4 / server-side Google Tag Manager
  • Component version: Firebase bom version: 34.9.0

Problem

Steps to reproduce:

I am implementing Server-Side Google Tag Manager (sGTM) via the Firebase SDK. While standard Firebase Analytics events are successfully sent to GA4, the sGTM uploader consistently fails to include these events in its upload batches, even when Preview Mode is active.

  1. Enable sGTM in the Android Manifest (google_analytics_sgtm_upload_enabled = true).
  2. Configure a Server-side tagging URL in the GA4 Android Data Stream (100% traffic).
  3. Launch the app via the sGTM Preview Intent (QR code/link).
  4. Logs confirm [sgtm] Preview Mode was enabled with the correct key.
  5. Trigger events (e.g., view_item, add_to_cart). Logs show events are registered.
  6. Observe the SCION_UPLOAD job. It consistently returns count: 0.

Log Output:

[sgtm] Preview Mode was enabled. Using the sgtmPreviewKey: ZW52LTY2...
Passing event to registered event handler (FE): view_item, Bundle[{...}]
[sgtm] App Receiver notified batches are available
[sgtm] Scheduling Scion upload, millis: 1000
AppMeasurementJobService is starting up.
onStartJob received action: com.google.android.gms.measurement.SCION_UPLOAD
[sgtm] Started client-side batch upload work.
[sgtm] Getting upload batches from service (FE)
[sgtm] Got upload batches from service. count: 0
[sgtm] Completed client-side batch upload work. total, success: 0, 0

Standard GA4 events do arrive in the GA4 (Realtime) console, but no requests hit the sGTM endpoint or show up in the GTM Server Preview console.

AndroidManifest.xml

<activity
            android:name="com.google.firebase.analytics.GoogleAnalyticsServerPreviewActivity"
            android:exported="true"
            android:noHistory="true">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data android:scheme="tagmanager.sgtm.c.${applicationId}" />
            </intent-filter>
        </activity>

        <meta-data
            android:name="google_analytics_sgtm_upload_enabled"
            android:value="true" />

\

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions