Add the Ad SDK Dependency
Add the following dependency to your app-levelbuild.gradle file.
📝 Note
If you’re using the Ad Analytics SDK, you do not need to add the Analytics SDK dependency separately. The Ad SDK already includes all analytics features, events, and insights. However, you must initialize the SDK in yourApplicationclass.
Initializing Analytics SDK in Android
Initialize the SDK in yourApplication class to start tracking sessions, events, and insights.
application
Android application context.
apiKey
Your Project API key.
orgId
Your organization ID, for example
twinalyze_demo_7356297484.Demo Account
Email: info@twinalyze.comPassword: 123
Github Demo
Open the Ad SDK Android demo project.
Download APK
Download and test the demo APK.
Demo
Open the Twinalyze demo dashboard.
✅ Best Practice
Always callinitialize()inside yourApplicationclass, not inside an Activity, to ensure complete session tracking.
Initialize Ads in the Launch Activity
RuninitAds() in the launch activity, typically SplashActivity, StartActivity, or MainActivity.
Add Ad View in XML
Place two ads in one Activity usingapp:position="top" and app:position="bottom".