0

I have a requirement to develop an iOS application in Unity that interacts with a server on Node.js.

One of the functions of this application is to display a WebView window. Within this WebView window, events can occur that we want to track and send data about these events to our application in Facebook (Meta), so we can then launch an advertising campaign optimized for one of the tracked events. We have a tracking system that identifies, for example, a purchase on the website displayed within the Unity application (this system is not built into the application), and we also have endpoints on our server that the Unity application accesses upon the first installation and each launch of the application. These endpoints send event data for the first installation and each launch using Conversions API to Facebook (Meta).

The problem is that we are not receiving SKAdNetwork attribution data for these events and, accordingly, cannot launch an advertising campaign for iOS 14+ users, which is a crucial criterion for us.

Facebook (Meta) Ads Manager gives us the following error when creating an advertising campaign for the application:

Facebook (Meta) Ads Manager message

Set up app events: To choose app events as the optimization for ad delivery, you need to set up app events in Events Manager first.

which most likely means that our SkAdNetwork Events are not configured. But we can’t configure them because we don’t receive SkAdNetwork attribution data. We are not getting this data because our SKAdNetwork setup is not complete, which is part of the original question (how do we do this?). Setting up SkAdNetwork Events requires SkAdNetwork Attribution data. We are receiving Event Data from our Graph API request. This data shown on a screenshot “Facebook (Meta) Event Data”. If this data will contain SkAdNetwork Attribution data then we will able to set up SkAdNetwork Events

Event data is successfully displayed in Facebook (Meta):

Facebook (Meta) Events data

How can we add SKAdNetwork support to the current configuration? If this is not possible in the current configuration, do we need to use the Facebook SDK for this?

This is the request that the server makes to Facebook (Meta) using the Conversions API:

var request = "https://graph.facebook.com/v20.0/{FacebookAppID}/activities";
var data = [
    {
        "event": "CUSTOM_APP_EVENTS",
        "custom_events": [
          {
            "_eventName": "fb_mobile_purchase",
            "_valueToSum": 100,
            "fb_currency": "USD"
          }
        ],
        "advertiser_id": "111111",
        "extinfo": "[\n  \"mb1\"\n]",
        "action_source": "website",
        "event_time": {time},
        "event_source_url": "https://example.com",
        "advertiser_tracking_enabled": 1,
        "application_tracking_enabled": 1,
        "user_data": {
          "external_id": "user123",
          "client_ip_address": "192.168.1.1",
          "client_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
          "fbc": "fb.1.1625247600.abcdefg",
          "fbp": "fb.1.1625247600.1234"
        }
      }
];

Previously, our applications used AppsFlyer, but we decided to discontinue its use. With AppsFlyer, we simply configured the MMP integration to set up SKAdNetwork Events on Facebook (Meta) and everything worked. I tried to do the MMP integration for the new approach, but it didn't work.

0