Send in-app purchase events to Segment

Connect in-app purchase events like trial starts, subscriptions, cancelations, and more to Segment from the App Store and Play Store

Use the Segment integration to:

  • Power analytics

    Easily connect IAP events to your analytics stack

  • Improve engagement

    Power push notifications or emails to subscibers that aren't using particular features

  • Win back users

    Send discount codes to users that have recently canceled

Events

Using our Segment integration you can connect the following events:

  • Initial Purchase
  • Trial Started
  • Trial Converted
  • Trial Cancelled
  • Renewal
  • Cancellation
  • Uncancellation
  • Non Subscription Purchase
  • Billing Issues
  • Expiration
  • Product Change
    Try it now

Sample Event

Below is sample JSON that is delivered to Segment for a renewal event

JSON
1{
2  "identify": {
3    "context": {
4      "environment": "production",
5      "library": {
6        "name": "RevenueCat Segment events",
7        "version": "1.0"
8      }
9    },
10    "timestamp": "2021-03-20T00:00:02",
11    "traits": {
12      "aliases": [
13        "$RCAnonymousID:0123456789abcdefghij0123456789ab",
14        "myCustomAppUserId"
15      ],
16      "last_seen_app_user_id": "myCustomAppUserId"
17    },
18    "userId": "$RCAnonymousID:0123456789abcdefghij0123456789ab"
19  },
20  "track_event": {
21    "context": {
22      "environment": "production",
23      "library": {
24        "name": "RevenueCat Segment events",
25        "version": "1.0"
26      }
27    },
28    "event": "renewal_event",
29    "properties": {
30      "app_user_id": "myCustomAppUserId",
31      "currency": "USD",
32      "entitlements": [
33        "your_entitlement_id"
34      ],
35      "entitlement": "your_entitlement_id",
36      "expires_at": 1647734402,
37      "original_app_user_id": "$RCAnonymousID:0123456789abcdefghij0123456789ab",
38      "product_id": "your_product_id",
39      "revenue": 9.99,
40      "store": "APP_STORE",
41      "purchased_at": 1616198402,
42      "subscriber_attributes": {
43        "$ip": "000.00.00.000",
44        "$idfa": "12345678-1234-1234-1234-123456789abc",
45        "$idfv": "12345678-1234-1234-1234-123456789abc",
46        "$email": "name@gmail.com",
47        "$fbAnonId": "12345678-1234-1234-1234-123456789abc",
48        "$apnsTokens": "fY1kOQ0bMl8:APA91bG_rM-ub0xg:DNjP553d8O8gTYs9iNWsYxZMLyzv46IhB--2qz810LRUhCIXTJE4_Umx-irs-FD6ET_qMCXyNeny7B6xn2-X0v69Be014Qa4BHv2XSTwrmF5PZ2L_LPxw4sL2_s1",
49        "$appsflyerId": "0123456789012-0123456",
50        "favorite_food": "pizza"
51      },
52      "period_type": "NORMAL",
53      "environment": "PRODUCTION",
54      "presented_offering_id": "default",
55      "transaction_id": "012345678912345",
56      "original_transaction_id": "987654321098765",
57      "aliases": [
58        "$RCAnonymousID:0123456789abcdefghij0123456789ab",
59        "myCustomAppUserId"
60      ]
61    },
62    "timestamp": "2021-03-20T00:00:02",
63    "userId": "$RCAnonymousID:0123456789abcdefghij0123456789ab"
64    }
65}

Ready to get started?

We saved 6,000+ engineering hours per year by switching to RevenueCat

Kemal Ugur, Pixery LabsKemal Ugur, Pixery Labs
Read case study