Kerdly

Guides

Client events, server events and deduplication

Which events your app or page sends, which your server or the stores send, where each one counts, and how Kerdly and the ad networks count every event once.

View as Markdown

Every guide in this section uses the same rules. This page collects them in one place.

Who sends what

EventFrom the client (app SDK, web SDK)From your server (/v1/s2s/events)From the store or RevenueCat
Ad click, visitWeb SDK, on every pageOptional: /v1/s2s/touchpoints, when your own server redirects
Click on a Kerdly linkRecorded by the link itself
Install, open, deep linkApp SDK
Identify (user id)identify / setUserId/v1/s2s/identify
RegistrationtrackRegistrationCustom event
Trial starttrackStartTrialstart_trial (web sales)App Store, Google Play, RevenueCat
First paid chargetrackSubscribesubscribe or trial_conversion (web sales)App Store, Google Play, RevenueCat
One-time purchasetrackPurchasepurchase (web sales)App Store, Google Play, RevenueCat
Renewalrenewal (web sales)App Store, Google Play, RevenueCat
Cancel, billing problem, expiryApp Store, Google Play
Refundrefund (web sales)App Store, Google Play, RevenueCat

Where revenue comes from: one source per store

Revenue is never added up from several places. For each store an app is paid through, Kerdly reads money from exactly one source:

StoreDefault source
The app's own store (app_store for an iOS app, play_store for an Android app)The store itself: its notifications and reports
paddle and stripe on the project's Web app, with that provider connectedThe provider itself: Kerdly reads its charges, renewals and refunds
Other web stores (rc_billing, web, and Paddle or Stripe not connected) on the Web appRevenueCat, when the Web app has RevenueCat connected; otherwise your server's events
Web stores on an iOS or Android appNot counted in that app's reports yet; count them in the Web app (see App with web payments)

So:

  • In an app, don't send App Store or Google Play charges from your server. They are read from the store; server copies of them don't count as revenue.
  • The SDK's trackStartTrial / trackSubscribe / trackPurchase are signals, not revenue. They arrive in seconds, tell the ad networks early, and fill the gap until the store reports the charge. The revenue in reports is the store's.
  • Web charges come from one place. A connected Paddle or Stripe is the source of its own charges, so don't send them from your server too. With RevenueCat connected to the Web app, RevenueCat is the source for the other web stores. To change it, set Revenue sources in the Web app's Settings, under Revenue: for example stripe read from your server.

How Kerdly counts each thing once

WhatThe keyWhat happens to a repeat
An SDK eventThe event id the SDK gives itRetries after a network error are stored once.
A server eventYour event_id (1 to 64 characters)Answered as duplicates, not stored again. Retries are safe.
A chargestore + transaction_idThe same charge from two paths (say RevenueCat's webhook and its backfill) is booked once. A refund finds its charge by transaction_id.
A subscriptionsubscription_id (web), original transaction id (App Store), purchase token (Google Play)Renewals join the subscription, and credit the ad of its first charge.
A store notificationApple's notification id; Play's token, type and timeStored once, even when the store sends it again.
A purchase linkOriginal transaction id (iOS), purchase token (Android)notifyPurchase links each once; calling it again is harmless.
An identifyThe visitor or install and user id pairSending the same pair again changes nothing.

How the ad networks count each event once

When an event reaches a network twice, from your app or pixel and from Kerdly's server, the network keeps one copy if both carry the same event id.

EventEvent id Kerdly sendsWhat your own copy must use
App trial start / first subscription read from the App Store or Google Play<transaction id>:trial_start, <transaction id>:subscribe (the original App Store transaction, or the base Play order)The same string as eventID in the Meta or TikTok SDK call
A website's server event (start_trial, subscribe, purchase, …)Your event_idYour pixel's eventID / event_id: use your order or charge id for both
Other pixel events (Lead, ViewContent, …)kerdly.eventId("Lead") on the page, and the same value if your server sends the event too

If your app also sends conversions to Meta or TikTok through their SDKs, call recordNetworkSend right after each one, with the same event id, so Kerdly can show both sides and you can see what each network received.

Two rules keep postbacks clean:

  1. Pick one sender per event and network. If Kerdly's postbacks send StartTrial to Meta, turn off the app's own StartTrial call to Meta, or keep it with the same event id.
  2. Renewals and refunds are not sent to ad networks by default. Their value is in your reports.

Test data

  • Apps: test builds use a pk_test_… key. Sandbox App Store and Google Play test purchases are recorded as sandbox.
  • Server: send "environment": "sandbox" for test-mode charges.
  • Live postbacks never send sandbox events.