Product Benefits Pricing Guides Docs About Contact us Try it out
Analytics tools

Amplitude Swift Custom HTTP Client Tracking

Amplitude Swift 1.20.0 supports custom HTTP clients. Learn custom HTTP client tracking to measure event delivery, retries and upload failures.

· 3 min read

Analytics events that never arrive are invisible. If your app routes traffic through a proxy, certificate pinning layer or privacy gateway, a quiet delivery failure can leave gaps in your funnels for weeks before anyone notices.

Amplitude Swift 1.20.0, released on 3 November 2026, added support for custom HTTP clients. You can now send event uploads through your own networking stack, which is useful for proxies, pinning, mTLS and shared retry logic. It requires AmplitudeCore 1.6.1.

Earlier releases tightened delivery too. Version 1.19.3 deletes acknowledged batches before callbacks run, and 1.19.4 tracks network requests made before remote config arrives. Together they make delivery easier to measure, as long as you measure it.

Data Points to Track

  • http_client_type (default or custom)
  • upload_status_code per batch
  • upload_latency_ms
  • batch_size (events per upload)
  • retry_count and retry_reason
  • events_queued and events_dropped
  • network_type (wifi, cellular, offline)
  • amplitude_swift_version and app_version

Setup Steps

  1. Upgrade to Amplitude Swift 1.20.0 with AmplitudeCore 1.6.1 in a beta build.
  2. Implement your custom client following the SDK’s HTTP client protocol.
  3. Log every upload result with status code, latency and batch size to your own monitoring.
  4. Compare delivered events against events your app generated, per session.
  5. Roll out to a small percentage of users and compare delivery rate with the default client.
  6. Alert on delivery rate dropping below your baseline, for example 99 percent.
  7. Document retry rules so the custom client and the SDK do not both retry the same batch.

Actionable Insights

A delivery rate below your baseline after switching clients means your client is dropping or duplicating batches. Check status codes first: a spike in 4xx responses usually means a header or payload change, while 5xx and timeouts point at your proxy.

Compare event counts between users on the custom client and the default one. A consistent gap, such as fewer events on cellular, shows where the stack fails under poor connections.

Watch for duplicate events. If both your client and the SDK retry, you can inflate counts. Use stable insert IDs and review dedupe results.

Common Mistakes to Avoid

Do not swallow errors in your client. If a failed upload returns success to the SDK, it will delete the batch and the events are gone for good. Return the true outcome every time.

Do not switch every user at once. A subtle bug in a networking layer can cost days of data, and you will only notice when a funnel drops. Use a staged rollout with a delivery check at each step.

Do not ignore consent. A custom client must still respect opt-out settings, so test that no uploads leave the device when a user declines tracking.