Table of Contents
ToggleHow I Set Up Complete Mobile Attribution for a Flutter Quran App Using Singular

Client: Confidential – Quran E-commerce App | Market: Saudi Arabia | App: Flutter | MMP: Singular | Timeline: 3 Days
Project Overview
| Client | Confidential — Quran E-commerce App |
| Market | Saudi Arabia 🇸🇦 |
| App Type | Flutter (iOS + Android) |
| MMP | Singular |
| Timeline | 3 Days |
| Tools Used | Singular, Firebase, Google Cloud, Flutter |
The Challenge
This client came to me with a critical problem: their mobile attribution was completely broken. They were running paid campaigns across 5 platforms but had no reliable data on which campaigns were driving installs and revenue.
1. iapinvalid Errors on Every Purchase
Their Flutter app was using logCustomRevenue() — a deprecated method that Singular rejects. Every purchase event was firing but being marked as invalid, meaning zero revenue attribution data was reaching the dashboard.
2. Wrong MMP on Snapchat
Snapchat was configured with AppsFlyer as the measurement partner — but the client was using Singular. Every Snapchat install and conversion was being lost entirely.
3. No Server-Side Purchase Tracking
Android purchase verification was happening only client-side, with no device-level GAID attribution. Significant revenue data was unverified and unattributed.
4. No Visibility Across Platforms
With broken event tracking and misconfigured ad platforms, the client could not see ROI for any campaign. Marketing budget was being spent with zero measurable return.
What I Did
Step 1 — Singular Flutter SDK Setup
Configured the Singular Flutter SDK from scratch with proper initialization, API keys, session handling, and event firing logic for both iOS and Android.
Step 2 — Fixed Purchase Event Tracking
Identified the root cause of iapinvalid errors — the app was using the deprecated logCustomRevenue() method. Replaced with:
Singular.logEventWithArgs(
"purchase",
{
"revenue": purchaseAmount,
"currency": "SAR",
"product_id": productId,
"transaction_id": transactionId,
}
);This immediately resolved all iapinvalid errors.
Step 3 — Deployed Server-Side Purchase Tracking via Firebase Cloud Function
Deployed a Firebase Cloud Function (singularPurchaseS2S) that triggers on Firestore document creation, extracts Android GAID for device-level attribution, and sends S2S events to Singular’s API.
Step 4 — Connected All 5 Ad Platforms
Verified and configured all ad platform integrations in Singular’s Data Connectors.
Step 5 — Verified Attribution Flow End-to-End
Used Singular’s Export Logs to verify complete attribution chain — clicks, conversions, installs, postbacks, and SKAN postbacks all confirmed.


Results
After completing the full setup, the client now has complete visibility across all campaigns:
| Total Installs Tracked | 15,820 |
| Total Impressions | 20,552,122 |
| Total Clicks | 138,780 |
| Total Ad Spend | ~255,537 SAR |
| Total Revenue (7d) | ~769,961 SAR |
| Overall ROI | 301.31% |
| Ad Platforms Connected | 5/5 ✅ |

Before vs After
| Before | After | |
|---|---|---|
| Purchase tracking | ❌ iapinvalid errors | ✅ All purchases tracked |
| Snapchat attribution | ❌ Wrong MMP | ✅ Singular configured |
| Server-side tracking | ❌ None | ✅ Firebase S2S active |
| Campaign ROI visibility | ❌ Zero | ✅ 301% ROI visible |
| Ad platforms connected | ⚠️ Broken | ✅ 5/5 Active |
Tools & Technologies Used
| Tool | Purpose |
|---|---|
| Singular | Mobile measurement platform (MMP) |
| Flutter SDK | Mobile app framework |
| Firebase Cloud Functions | Server-side purchase tracking |
| Google Cloud Logs Explorer | Debugging & verification |
| Firestore | Purchase data trigger |
| Facebook Ads | Paid UA channel |
| TikTok Ads | Paid UA channel |
| Google Ads | Paid UA channel |
| Apple Search Ads | iOS UA channel |
| Snapchat Ads | Paid UA channel |
Frequently Asked Questions
How long does a Singular mobile attribution setup take?
A complete Singular setup including SDK integration, server-side purchase tracking, and ad platform connections typically takes 2-4 days depending on app complexity.
Can you set up Singular for Flutter apps?
Yes. I specialize in Flutter SDK integration for both iOS and Android, including server-side purchase tracking via Firebase Cloud Functions.
What is server-side purchase tracking and why does it matter?
Server-side tracking sends purchase events directly from your server to the MMP — bypassing client-side limitations. This ensures accurate revenue attribution with device-level GAID data on Android.
How do you fix iapinvalid errors in Singular?
iapinvalid errors happen when deprecated SDK methods like logCustomRevenue() are used. The fix is replacing them with logEventWithArgs() with proper purchase parameters.
Can you fix wrong MMP configuration on ad platforms?
Yes. MMP misconfiguration — like having AppsFlyer set as measurement partner when using Singular — is a common issue. I audit and fix all ad platform MMP settings as part of my setup service.
Need the Same Setup for Your App?
If your mobile attribution is broken — wrong MMP, missing purchase data, or untracked installs — I can fix it.
I specialize in:
- Singular, AppsFlyer, Adjust setup & audit
- Flutter, React Native, native iOS/Android SDK integration
- Server-side purchase tracking via Firebase
- Ad platform MMP configuration
- SKAdNetwork setup for iOS