简体   繁体   中英

Facebook App Events - track facebook add clicks resulting in app install conversations - without Facebook SDK?

Is there a way to use the Facebook App Events with a backend integration, without integrating the Facebook SDK?

https://developers.facebook.com/docs/app-events/android

We have a SaaS solution with a common API shared by all of our client devices. I was hoping to extend our API to include the new metrics (FB add clicks resulting in our app installs), and then integrate with FB on our backend. Is something like this possible? I'm not clear on how the Facebook SDK works, from what I could tell from the docs the idea is that you update your application to make calls to the FB SDK, but that was about it. Is integrating with the FB SDK on the client my only option?

Just curious to know what experience others have with this

@Hoofmon As you have also mentioned 

API Call Example


curl \
  -F "event=CUSTOM_APP_EVENTS" \
  -F "advertiser_id=1111-1111-1111-1111" \
  -F "advertiser_tracking_enabled=1" \
  -F "application_tracking_enabled=1" \
  -F "custom_events=[{\"_eventName\":\"fb_mobile_purchase\",                                                                                                                                                                                                                                                                                                             
                      \"_valueToSum\":55.22,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                      \"_logTime\":1367017882,                                                                                                                                                                                                                                                                                                                           
                      \"fb_currency\":\"GBP\",                                                                                                                                                                                                                                                                                                                           
                    }]" \
  "https://graph.facebook.com/API_VERSION/APP_ID/activities"

The response is be true. If you receive an error, retry the request.


Android Client

Place the Facebook attribution ID in Android in a ContentProvider that can be accessed by other apps on the phone. The code snippet below is an example of how to retrieve this ID.


public static final Uri ATTRIBUTION_ID_CONTENT_URI = Uri.parse("content://com.facebook.katana.provider.AttributionIdProvider");

public static final String ATTRIBUTION_ID_COLUMN_NAME = "aid";

public static String getAttributionId(ContentResolver contentResolver) {
        String [] projection = {ATTRIBUTION_ID_COLUMN_NAME};
        Cursor c = contentResolver.query(ATTRIBUTION_ID_CONTENT_URI, projection, null, null, null);
        if (c == null || !c.moveToFirst()) {
            return null;
        }
        String attributionId = c.getString(c.getColumnIndex(ATTRIBUTION_ID_COLUMN_NAME));
        c.close();
        return attributionId;
    }


You should also fetch Android’s advertising ID, see instruction Android, Play Service ID.

Cookie Format

The cookie is a 22-character random alphanumeric string. It is not derived from any user or device attributes. Also this mobile cookie is not persistent and is designed to be refreshed frequently, so you cannot use this for re-targeting or so.

You can use this API

https://graph.facebook.com/<API_VERSION>/<APP_ID>/activities

View the documentation here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM