Project Overview

ClientConfidential — Quran E-commerce App
MarketSaudi Arabia 🇸🇦
App TypeFlutter (iOS + Android)
MMPSingular
Timeline3 Days
Tools UsedSingular, 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.

Firebase Cloud Function singularPurchaseS2S handling 2414 requests per day for server-side purchase tracking
Singular Data Connectors showing 5 ad platforms active including Facebook, TikTok, Google, Apple, Snapchat

Results

After completing the full setup, the client now has complete visibility across all campaigns:

Total Installs Tracked15,820
Total Impressions20,552,122
Total Clicks138,780
Total Ad Spend~255,537 SAR
Total Revenue (7d)~769,961 SAR
Overall ROI301.31%
Ad Platforms Connected5/5 ✅
Singular attribution report showing 301% ROI across Facebook, TikTok, Google Ads, Apple Search Ads and Snapchat

Before vs After

BeforeAfter
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

ToolPurpose
SingularMobile measurement platform (MMP)
Flutter SDKMobile app framework
Firebase Cloud FunctionsServer-side purchase tracking
Google Cloud Logs ExplorerDebugging & verification
FirestorePurchase data trigger
Facebook AdsPaid UA channel
TikTok AdsPaid UA channel
Google AdsPaid UA channel
Apple Search AdsiOS UA channel
Snapchat AdsPaid 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