Codeless App Events, introduced in v4.34, enable you to use the Events Manager to add or remove app events without implementing code or releasing a new version of your app.
You must have one of the following:
Please see the Getting Started with App Events for Android Guide to install the latest version of the Facebook SDK for Android, the Upgrade Guide to upgrade to the latest version of the SDK, or, if you installed v4.34-4.37, add the Marketing Kit by opening your <your_app> | Gradle Scripts | build.gradle (Module: app) and adding the following to the dependencies{}
section.
implementation 'com.facebook.android:facebook-marketing:[4,5)'
Don't forget to rebuild your project.
To turn on Codeless debug event, add the following lines in AndroidManifest.xml
:
<meta-data android:name="com.facebook.sdk.CodelessDebugLogEnabled" android:value="true" />
Go to the Events Manager to codelessly add app events you want to track.
Note: It may take up to 30 minutes for events to appear in your Events Manager.
Go to App Ads Helper.
fb_codeless_debug
events, the test events you selected will be listed in the table.Note: Only works for Facebook SDK v4.35 and above.
Please visit the Getting Started with App Events for iOS Guide to install the latest version of the iOS SDK, the Upgrade Guide to upgrade to the latest version of the SDK, or, if you have installed v4.34-4.37 of the Core SDK only, add the Marketing Kit by adding the following to your Podfile.
pod 'FBSDKMarketingKit'
Don't forget to run pod update
then pod install --repo-update
.
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/>
Events that your app collects and sends to Facebook may require you to disclose these data types in the App Store Connect questionnaire. It is your responsibility to ensure this is reflected in your application’s privacy policy. Visit the Apple App Store Privacy Details article to learn more about the data types you will need to disclose.
Go to the Events Manager to codelessly add app events you want to track.
Note: It may take up to 30 minutes for events to appear in your Events Manager.
Go to App Ads Helper.
fb_codeless_debug
events, they will be listed in the table.We require Facebook Unity SDK v4.34 or higher.
See Getting Started with Facebook Unity SDK to install the latest version of Facebook Unity SDK, and follow platform-specific settings for Unity iOS or Unity Android.
To turn on this option, in Unity Editor
select Facebook | Edit Settings
, then select Auto Logging App Events
:
At this point you can add App Events with Events Manager:
Under Add Data Source
, select App Events
.
Click User our codeless event setup tool
Select the app you want to add events to.
Click Start Setup
to select your platform. If this is your first time visiting the codeless flow you'll see a small tutorial.
After the tutorial, open a new session of your app on your mobile device.
Shake your mobile device until a version of your app appears.
Click on any element in your app to add an app event. Navigate to different pages of your app to select elements throughout your app.
In Unity Editor
, click Save
to add the event.
After you have add all your events click Review and Finish
.
Click Test Events
or Save and Exit
.
It may take up to 30 minutes for events to appear in your Events Manager. Repeat these steps for each platforms, such as iOS or Android that your game support.
Go to App Ads Helper.
Under Select an App
, Click Submit
.
Choose App Events Tester
.
If your app sends fb_codeless_debug
events, they appear in the table.
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.
To turn off Codeless app event logging, use the codeless event setup tool and remove all events.
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>
[!] Unable to find a specification for FBSDKMarketingKit
pod update
then pod install --repo-update
.