This page is currently under construction. We apologize for any inconvenience. Please check back soon for the content you are looking for.
About btgadjustadapter
The btgadjustadapter is a library that provides seamless integration between the Adjust SDK and the Branch SDK. It allows developers to easily track and measure app installs and events using both Adjust and Branch.
Installation
To install the btgadjustadapter in your iOS project, you can use either CocoaPods or Carthage.
Using CocoaPods
To install the btgadjustadapter using CocoaPods, simply add the following line to your Podfile:
pod 'btgadjustadapter'
Then, run the following command in your terminal:
pod install
Using Carthage
To install the btgadjustadapter using Carthage, add the following line to your Cartfile:
github "adjust/btgadjustadapter"
Then, run the following command in your terminal:
carthage update
Getting Started
Before you start using the btgadjustadapter, make sure you have both the Adjust SDK and the Branch SDK integrated into your project.
Initializing the SDKs
To initialize the Adjust SDK, use the following code:
Adjust.appDidLaunch(ADJConfig(appToken: "YOUR_ADJUST_APP_TOKEN", environment: ADJEnvironmentSandbox))
Make sure to replace “YOUR_ADJUST_APP_TOKEN” with your actual Adjust app token.
To initialize the Branch SDK, use the following code:
Branch.getInstance().initSession(launchOptions: launchOptions) { params, error in
// Your code here
}
Make sure to call the above code within your AppDelegate’s didFinishLaunchingWithOptions
method.
Initializing the btgadjustadapter
After initializing both the Adjust and Branch SDKs, you can initialize the btgadjustadapter by calling the following method:
btgadjustadapter.initialize()
This will set up the necessary tracking and measurement functionalities provided by both Adjust and Branch.
Usage
Once the btgadjustadapter is initialized, you can start using the tracking and measurement features of both Adjust and Branch.
To track a custom event with Adjust, use the following code:
Adjust.trackEvent(ADJEvent(eventToken: "YOUR_ADJUST_EVENT_TOKEN"))
Make sure to replace “YOUR_ADJUST_EVENT_TOKEN” with the event token defined in your Adjust dashboard.
To track a custom event with Branch, use the following code:
let branchEvent = BranchEvent.customEvent(withName: "YOUR_EVENT_NAME")
Branch.getInstance().logEvent(branchEvent)
Make sure to replace “YOUR_EVENT_NAME” with the name of the custom event you want to track.
By using the btgadjustadapter, you can track events using both Adjust and Branch concurrently, simplifying the integration process.
Additional Resources
If you have any questions or need further assistance, please don’t hesitate to contact us.