1

I have FB analytics configured for iOS and android app. It does recognize iOS platform when viewing events correctly. But for android it only qualifies it as android about 30% of all. Here's how those events are shown in FB analytics debugging screen: ('inne wartości' stands for 'other') 'Inne wartości stands for 'other'

I wonder how FB does the recognition? By advertising id? Read docs through but didn't find info about this anywhere.

Here's a FB response that gets recognized as android: (obfuscated few details):

  {
  "req": {
    "method": "POST",
    "url": "https://graph.facebook.com/v2.6/000000000/activities",
    "data": {
      "advertiser_id": "2e9ab235-84c0-4b22-8421-xxxxxxxxxxxxx",
      "advertiser_tracking_enabled": 1,
      "application_tracking_enabled": 1,
      "bundle_id": "com.myapp",
      "bundle_short_version": "1.7.0",
      "event": "CUSTOM_APP_EVENTS",
      "custom_events": [
        {
          "_appVersion": "1.7.0",
          "_eventName": "App Launched",
          "_logTime": 1476295031,
          "fb_currency": "USD"
        }
      ]
    },
    "headers": {
      "user-agent": "Segment.io/1.0",
      "content-type": "application/json"
    }
  },
  "header": {
    "access-control-allow-origin": "*",
    "pragma": "no-cache",
    "cache-control": "private, no-cache, no-store, must-revalidate",
    "facebook-api-version": "v2.6",
    "expires": "Sat, 01 Jan 2000 00:00:00 GMT",
    "content-type": "text/javascript; charset=UTF-8",
    "x-fb-trace-id": "BH4kXNYDDL+",
    "x-fb-rev": "2617769",
    "x-fb-debug": "eNcBCpuFfVirTkclVvZ0WeYh60r+2tBIqg6lKPCrWNtGASVULq6jrVwQxqYulMUyCI3ZaBhZRQ64xdxdXOQg2w==",
    "date": "Wed, 12 Oct 2016 17:57:24 GMT",
    "connection": "close",
    "content-length": "16"
  },
  "status": 200,
  "text": "{\"success\":true}"
}

And this one is not recognized as android:

{
  "req": {
    "method": "POST",
    "url": "https://graph.facebook.com/v2.6/000000000000/activities",
    "data": {
      "advertiser_id": "88697a4d-f658-41d3-84db-xxxxxxxxxx",
      "advertiser_tracking_enabled": 1,
      "application_tracking_enabled": 1,
      "bundle_id": "com.myapp",
      "bundle_short_version": "1.7.0",
      "event": "CUSTOM_APP_EVENTS",
      "custom_events": [
        {
          "_appVersion": "1.7.0",
          "_eventName": "App Launched",
          "_logTime": 1476206487,
          "fb_currency": "USD"
        }
      ]
    },
    "headers": {
      "user-agent": "Segment.io/1.0",
      "content-type": "application/json"
    }
  },
  "header": {
    "access-control-allow-origin": "*",
    "pragma": "no-cache",
    "cache-control": "private, no-cache, no-store, must-revalidate",
    "facebook-api-version": "v2.6",
    "expires": "Sat, 01 Jan 2000 00:00:00 GMT",
    "content-type": "text/javascript; charset=UTF-8",
    "x-fb-trace-id": "AqASb9qsUSx",
    "x-fb-rev": "2613995",
    "x-fb-debug": "aDLUDoC+7vmlVY28UsEtusYgzdkmxK8qVrn4gCo29ovLw9Us27Gh/Iy1163dfTDF5rKg/JWiv3xsfq3hugijlg==",
    "date": "Tue, 11 Oct 2016 17:21:37 GMT",
    "connection": "close",
    "content-length": "16"
  },
  "status": 200,
  "text": "{\"success\":true}"
}

I can't see any interesting changes that that would point to an android platform.

Update

As advised by Ramkumar, I tried posting events with FB sdk and it indeed worked. I'd really like to keep using segment, so keeping this as solution is not possible in my app. I wonder what's missing from the params that segment sends to FB. Is this because of session_id which is in there when using FB SDK but is absent in segment request? See gist with dump from adb logcat when using FB SDK

Kamil Sarna
  • 5,993
  • 1
  • 32
  • 22

1 Answers1

2

From your post, it looks like you are using segment.io to send events to our servers. If you use the FB SDK to send events you will not see this problem - could you please give that a try?

  • Ramkumar - tried with FB sdk and it indeed worked. Yet, I'd really like to keep using segment. I wonder what's missing from the params that they pass. Is this because of session_id? Noticed that it's in there when using FB SDK but is absent from segment request. See dump from adb logcat when using FB SDK: https://gist.github.com/ksarna/8368e24839ec6b53747865a2adb249d1 – Kamil Sarna Oct 19 '16 at 11:12