Send subscriptions events to Segment .
Glassfy monitors the subscriptions and sends all the relevant events to Segment even if the user does not open the app.

  1. Copy the "Write Key" from Segment Workspace -> Connections -> Sources
  2. Open Segment connector setting in the Glassfy dashboard and paste the "Write Key"
  3. If you are integrating the Segment SDK in your app you can following this instruction to connect the events data with the user.

Event format

Glassfy will send to Segment a record with the following format every time an event is generated

  "context": {
    "environment": "Sandbox",
    "library": {
      "name": "Glassfy Segment",
      "version": "1.0"
  "batch": [
      "type": "track",
      "userId": "my_custom_identifier",
      "timestamp": "2021-04-28 15:33:28.413754 +0200 CEST m=+1356.540492913",
      "event": 5002,
      "properties": {
        "app_user_id": "my_custom_identifier",
        "currency": "GBP",
        "country_code": "GB",
        "entitlements": null,
        "entitlement": "",
        "expires_at": 1607955966000,
        "subscriber_id": "43ac4928d1c048eab25dec698ae4f0bd",
        "product_id": "ios_premium_weekly_1_99",
        "revenue": 2.7682972449546117,
        "store": "APP_STORE",
        "purchased_at": 1607955786000,
        "environment": "Sandbox",
        "product_permissions": "articles,",
        "presented_offering_id": "",
        "transaction_id": "1000000788008512",
        "original_transaction_id": "1000000754137991",
        "sub_platform": "1",
        "system_version": "12.5.1",
        "device": "iPhone7,1",
        "sdk_version": "dev",
        "bundle_version": "66",
        "app_version": "1.0"

Integrate with Segment SDK

If you optionally integrate the Segment SDK in your app please follow the instructions here

The subscriberId will be assigned to the segment anonymousId

The segment userId will be sent if the following code is called (please refer to this documentation ho how to setup the custom identifier

Glassfy.connectCustomSubscriber("my_custom_identifier") { error in
    // handle error.

[Glassfy connectCustomSubscriber:@""my_custom_identifier"" withCompletion:nil];
await Glassfy.connectCustomSubscriber("my_custom_identifier");
await Glassfy.connectCustomSubscriber('my_custom_identifier');
await Glassfy.connectCustomSubscriber({ subscriberId: 'my_custom_identifier' });
Glassfy.connectCustomSubscriber("my_custom_identifier") { error ->
    // handle error.

The subscriberId will be assigned to the segment anonymousId

The advertisingId will be set to Idfa on iOS and Gaid on Android (please refer to this documentation on how to setup the attributions parameters