Ecommerce / Marketplace minimum
Essential events: view_item → add_to_cart → begin_checkout → purchase.
Add list, cart, shipping and payment-step events when those steps exist and can be logged reliably.
Follow the Android implementation path, send only the events that matter for your business model, and verify the signal before release.
This is the work the app developer must do. Complete it in order.
Register the exact Android package name or iOS Bundle ID and add the correct Firebase configuration file to this app target.
Install Analytics, run a development build, log one event, and confirm it appears in Firebase / GA4 DebugView.
After sign-in, set one stable internal non-PII user_id. Clear it on logout. Never use email or phone as the User-ID.
Install Mobile GTM for this platform and add the exact container file downloaded from KePixel → Sources → this mobile app → Setup.
Apply the platform-specific setting below, then paste the Server Tagging URL from KePixel Setup into the matching GA4 App Data Stream.
Start with the Essential events for the app's actual business model. Add Recommended events only when they add reliable funnel, product, revenue, or attribution context.
Keep Firebase automatic campaign signals intact. If the app explicitly receives campaign or deep-link metadata, use campaign_details. Verify an Essential event in DebugView, then confirm Test event received in KePixel.
Open KePixel → Sources → this mobile app → Setup. You do not need KePixel GTM account access and you do not need to request these values manually.
In the KePixel Mobile Container card, click Download container file when the backend has prepared the installable container.
In the KePixel Server Connection card, click Copy beside the exact KePixel Server Tagging URL.
Both values appear automatically for this source after KePixel provisioning completes. If a card still shows Preparing, open the source Overview tab and use Refresh source status; do not copy a file or URL from another app, tenant, or environment.
Use a Firebase Project owned by the customer organization. Register the real app identifier used by this build and use only the configuration file for the platform selected above. KePixel does not require Firebase ownership, GTM account access, or destination credentials from the app developer.
Use the real Android package name and Firebase's google-services.json. Place the file in the app module, normally app/google-services.json.
Use the real case-sensitive Bundle ID and Firebase's GoogleService-Info.plist. Add the file to the Xcode project and the exact app target being integrated.
Open KePixel → Sources → this mobile app → Setup. The KePixel Mobile Container card exposes the platform-specific Download container file action, and the KePixel Server Connection card exposes the source-specific KePixel Server Tagging URL with Copy. These controls are populated automatically by KePixel provisioning.
Register the app with its real package name. Download google-services.json and place it in the app-module root, normally app/google-services.json. Apply the com.google.gms.google-services Gradle plugin so Firebase can read the configuration file.
Use the Firebase Android BoM and add Analytics in the app module. Make sure the Google services plugin is applied in that same app module.
Add the current Google Play services Tag Manager dependency documented by Google.
Open KePixel → Sources → this Android app → Setup → KePixel Mobile Container and click Download container file. Create app/src/main/assets/containers if it does not exist, copy the downloaded container file into that folder, and keep its downloaded filename unchanged. GTM account access is not required.
Inside the <application> element of AndroidManifest.xml, add the Google Analytics server preview activity and the sGTM upload metadata. Replace the package placeholder with the lowercase application package ID.
Copy the URL from KePixel → Sources → this Android app → Setup → KePixel Server Connection → KePixel Server Tagging URL → Copy. Then open Google Analytics → Admin → Data streams → Android app → Configure SDK settings → Configure server-side Tag Manager, enable sending to a server-side container, and paste that exact URL. Start with debug devices or a controlled traffic percentage if your rollout policy requires validation first.
Use the Event Catalog below. Prefer Google's recommended Firebase/GA4 names and prescribed parameters.
Build the app on a test device, then complete the Test your KePixel Mobile connection section below before releasing the app update.
Register the real, case-sensitive Bundle ID. Download GoogleService-Info.plist, move it into the root of the Xcode project, and make sure it is included in the app target you are integrating.
For new projects, use Swift Package Manager. Add https://github.com/firebase/firebase-ios-sdk.git in Xcode and select FirebaseAnalytics. Initialize Firebase when the app launches by calling FirebaseApp.configure() from your app delegate. SwiftUI apps should attach that app delegate with @UIApplicationDelegateAdaptor.
With Swift Package Manager, add https://github.com/googleanalytics/google-tag-manager-ios-sdk.git and use the latest supported version. Add -ObjC to Other Linker Flags. If your project uses CocoaPods, Google's current guide documents pod 'GoogleTagManager', '~> 6.0'.
Open KePixel → Sources → this iOS app → Setup → KePixel Mobile Container and click Download container file. Create PROJECT_ROOT/container, place the downloaded GTM-XXXXXX.json file inside it, then in Xcode choose File → Add Files to…, select the container folder, open Options, and make sure Create folder references is selected before finishing. You do not need access to KePixel's GTM account.
In Info.plist, configure the custom preview URL scheme tagmanager.sgtm.c.BUNDLE_ID and set GOOGLE_ANALYTICS_SGTM_UPLOAD_ENABLED to true. For SwiftUI/UIScene apps, forward the opened preview URL to Analytics.handleOpen(url) as documented by Google.
SwiftUI preview handling: forward the opened server-side preview URL to Firebase Analytics.
Copy the URL from KePixel → Sources → this iOS app → Setup → KePixel Server Connection → KePixel Server Tagging URL → Copy. Then open Google Analytics → Admin → Data streams → iOS app → Configure SDK settings → Configure server-side Tag Manager, enable sending to a server-side container, and paste that exact URL.
Use the same event contract below. Only installation code differs between Android and iOS.
Run the app on a test device, then complete the Test your KePixel Mobile connection section below before releasing the app update.
More events do not automatically mean better tracking. Duplicate, premature or low-context events create noise. Implement an event only when the user action actually happens and use the same semantic event name on Android and iOS.
These events or fields carry the conversion/funnel signal KePixel needs for high-quality routing and optimization.
Send when the app knows the value reliably. They improve product context, funnel diagnosis and downstream reporting.
Do not manufacture values just to fill them. Missing optional context is better than inaccurate context.
Essential events: view_item → add_to_cart → begin_checkout → purchase.
Add list, cart, shipping and payment-step events when those steps exist and can be logged reliably.
Essential: generate_lead after a successful submission. Add sign_up only when account creation is a meaningful conversion.
Never put email, phone or full name in Firebase event parameters.
Essential: begin_booking and booking_complete. view_service is Recommended. Location/staff selection events are Optional unless they are important funnel steps.
Essential when applicable: start_trial and/or subscribe. If money is actually charged, also send purchase as the monetary transaction with a unique transaction_id.
Lifecycle events and purchase revenue are different signals; do not use the same destination conversion twice.
purchase from automatically collected native-store purchase signals. Google states that automatically logged Google Play in-app purchases are not sent to the Android server container through the mobile sGTM path. KePixel Mobile V1 therefore does not claim automatic App Store / Google Play purchase delivery through this route until a dedicated store-purchase contract is validated. Do not create a manual duplicate just to force it through Server GTM.Firebase Analytics already supplies app-instance, app, platform, device and session context. Do not duplicate those values as custom parameters just to make events look fuller.
user_idRecommended when accounts exist: set one stable internal non-PII account ID after successful sign-in and clear it on logout.
Set it with Firebase Analytics' User-ID API. Do not pass it as a normal event parameter, and never use an email address or phone number as the User-ID.
Do not put raw or hashed email/phone into normal Firebase Analytics event parameters.
Mobile V1 currently has no KePixel identity-enrichment endpoint in Source Setup. Cross-destination email/phone matching requires a separate reviewed identity channel with consent and app-attestation controls; it is not another event parameter.
Essential on purchase: transaction_id, currency, value, and items.
Whenever an event carries value, also send the correct ISO currency. Keep transaction and item identifiers stable across retries.
Prefer a stable item_id for each product, plan, service, or marketplace item. Add price and quantity when the event carries value.
item_name, brand, category and variant are useful context, but should not replace a stable ID when one exists.
Keep Firebase's automatic campaign/referrer signals intact. When the app explicitly receives trustworthy campaign or deep-link metadata that is not already handled automatically, log campaign_details.
Provide at least one of source, medium, or campaign. Add campaign_id, source_platform, term, content, creative_format, and marketing_tactic only when genuinely known.
Keep Google Play and deep-link/referrer measurement intact. Do not manually copy the Android Advertising ID into custom event parameters and do not invent Google or ad-network click IDs.
Add AdSupport when Firebase advertising features that depend on IDFA are intentionally enabled. Use Apple attribution frameworks where relevant, and request App Tracking Transparency authorization before accessing data used for cross-app tracking.
Firebase does not create Meta, TikTok, Snapchat, or other networks' proprietary click IDs for you. Only use a network click ID when an approved SDK, MMP, or deep-link/referrer integration actually supplies it. If the signal is unavailable, leave it absent rather than fabricating it.
kpx_event_id is not a required developer field in Mobile V1 unless KePixel Source Setup explicitly exposes an approved contract for it.
Do not invent an app-side event-ID algorithm for Mobile V1.
browser cookies such as _fbp and _fbc are web/browser concepts and must not be fabricated inside a native app.
Use only identifiers produced by the native platform or an approved attribution integration and only when the app's consent state allows it.
Do not send raw or hashed email, phone number, full name, postal address, payment details, IDFA, Android Advertising ID, access tokens, Firebase secrets, GTM credentials, or destination credentials as ordinary custom event parameters.
user_id may be a stable internal non-PII account identifier and must be set through Firebase's User-ID API. Email/phone matching needs a dedicated consented user-data mechanism.Use only campaign data that the app actually receives. Do not fabricate click IDs.
Use only campaign data that the app actually receives. Do not fabricate click IDs.
This example uses the KePixel high-quality purchase baseline: unique transaction_id, ISO currency, accurate value, and an items array with a stable product ID, name, unit price and quantity. value equals the sum of item price × quantity and does not include shipping or tax.
purchase on a button tap alone. Log it only after the app or backend confirms the transaction. Reuse the same business transaction ID for retries of the same transaction so the purchase can be deduplicated correctly.Connect the test device, replace PACKAGE_NAME, then run:
Disable it after testing with:
In Xcode, edit the app scheme and add -FIRDebugEnabled under Arguments Passed On Launch.
Disable it after testing with -FIRDebugDisabled.
purchase with a unique test transaction ID and a populated items array.firebase_, google_, or ga_ prefixes.app_remove is not reported through this Android server-side setup.For SwiftUI or UIScene apps, make sure the server-side preview URL is forwarded to Analytics.handleOpen(url). That preview handling is platform-specific and should not be copied from the Android setup.