Codeless App Events is a feature of the Facebook SDK that allows you to quickly and easily track any user in-app actions without implementing codes or releasing a new version of your app. Instead, you can use a simple visual set-up tool to define event names for any elements of the app screens such as buttons, images or links. As your users navigate through the app and interact with these UI elements, events will be sent to Facebook. This tool can be accessed from Facebook's Events Manager.
To use this tool, your app will need to be integrated with Facebook SDK v4.34 or above. Beginning from this version, the FB SDK will contain the 'Marketing Kit' to enable codeless app events. Please follow the instructions below.
pod 'FBSDKMarketingKit'
Run pod install or pod install --repo-update
info.plist file before the </dict> element:
<key>FacebookAppID</key> <string>your-app-id</string> <key>FacebookDisplayName</key> <string>your-app-name</string>
Turn on Codeless debug event logging by opening the application's .plist as code in Xcode and add the following XML to the property dictionary:
<key>FacebookCodelessDebugLogEnabled</key> <true/>
Then go to App Ads Helper.
fb_codeless_debug events, they will be listed in the table.
In the buildscript { repositories {}} section of the build.gradle (Project) file, add:
mavenCentral()
Add the following to the dependencies {} section of your build.gradle (module: app) file to compile the latest version of the Facebook SDK, which includes Marketing Kit.
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
implementation 'com.facebook.android:facebook-core:[4,5)'Then, add the following line to integrate the Marketing Kit separately:
implementation 'com.facebook.android:facebook-marketing:[4,5)'
meta-data element to the application element:
<application android:label="@string/app_name" ...>; ... <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/> ... </application>
Turn on Codeless debug event by adding the following lines in AndroidManifest.xml:
<meta-data
android:name="com.facebook.sdk.CodelessDebugLogEnabled"
android:value="true" />Then go to App Ads Helper.
fb_codeless_debug events, they will be listed in the table.
Note: Only works for Facebook SDK v4.35 and above.
A few minutes after you have launched your app on your test device, you will see events with the name fb_codeless_debug in the Events Manager or Facebook Analytics.
[!] Unable to find a specification for FBSDKMarketingKit
pod update then pod install --repo-update.
Android SDK build Error:Execution failed for task ':app:processDebugManifest'.> Manifest merger failed : Attribute activity#com.facebook.FacebookActivity@theme value=(@android:style/Theme.Translucent.NoTitleBar) from AndroidManifest.xml:69:13-72is also present at [com.facebook.android:facebook-android-sdk:4.16.0] AndroidManifest.xml:32:13-63 value=(@style/com_facebook_activity_theme).Suggestion: add 'tools:replace="android:theme"' to <activity> element at AndroidManifest.xml:66:9-70:47 to override.
manifest element in your AndroidManifest.xml file:
<manifest> ... xmlns:tools="http://schemas.android.com/tools" ... </manifest>And the following to the
activity element:
<activity> ... tools:replace="android:theme" ... </activity>