Session parameters
You can create session parameters to send data back with tracked objects. Session parameters are key-value pairs that the SDK attaches to payloads. Once you have added parameters the SDK saves them for re-use elsewhere. This means if you add the same parameter twice it has no effect on the parameter value.
The SDK sends session parameters back with each of the following:
Sometimes you can only set session parameters after your app has launched. If this is the case, you can delay the first launch of the Adjust SDK. This gives you time to set the parameters and enable the Adjust SDK to send them with the install event.
Session callback parameters
You can send callback parameters with each session of the Adjust SDK. You can set up session callback parameters by calling the addSessionCallbackParameter
method:
The Adjust SDK will merge session callback parameters with event callback parameters. Event callback parameters take priority over session callback parameters. This means that if you add a parameter key to both an event and a session, the SDK will send the event parameter.
You can remove specific session callback parameters if they are no longer required. To do this, call the removeSessionCallbackParameter
method with the parameter key.
You can remove all session parameters if they are no longer required. To do this, call the resetSessionCallbackParameters
method.
Session partner parameters
The Adjust SDK also enables you to send callback parameters to network partners. You will need to set up your network partners in the Adjust dashboard to use this feature.
You can set up session partner parameters by calling the addSessionPartnerParameter
method:
The Adjust SDK will merge session partner parameters with event partner parameters. Event partner parameters take priority over session partner parameters. This means that if you add a partner parameter key to both an event and a session, the SDK will send the event parameter.
You can remove specific session callback parameters if they are no longer required. To do this, call the removeSessionPartnerParameter
method with the parameter key.
You can remove all session partner parameters if they are no longer required. To do this, call the resetSessionPartnerParameters
method.
Delay start
By default, the Adjust SDK will start as soon as your app opens. If you want to send data that is not available at launch in session parameters, you can delay the start of the SDK. This can be helpful if you are sending information such as unique identifiers.
You can set a delay by passing the delay time in seconds to the delayStart
property.
In the above example, the Adjust SDK will not send the install session or any events for 5.5 seconds. After this time has elapsed, the SDK will send the information to the backend. You can send the information before the timeout by calling the sendFirstPackages
method.