English

Session parameters

The Adjust SDK can save certain parameters, that can then be sent with every event and session. These are known as session parameters. Once you have added parameters the SDK will save them for re-use elsewhere. This means if you add the same parameter twice it will have no effect on the parameter value.

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 will give you time to set the session parameters and enable them to be sent with the install event.

Session callback parameters

You can send callback parameters with each session of the Adjust SDK. Session callback parameters have a similar interface to event callback parameters. You can set up session callback parameters by calling the Adjust.addSessionCallbackParameter method:

Java
Javascript
Adjust.addSessionCallbackParameter("foo", "bar");

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 Adjust.removeSessionCallbackParameter method with the parameter key.

Java
Javascript
Adjust.removeSessionCallbackParameter("foo");

You can remove all session parameters if they are no longer required. To do this, call the Adjust.resetSessionCallbackParameters method.

Java
Javascript
Adjust.resetSessionCallbackParameters();

Session partner parameters

The Adjust SDK also enables you to send callback parameters to network partners. You will need to set up your network partnersin the Adjust dashboard to use this feature.

The session partner parameters have a similar interface to the event partner parameters. You can set up session partner parameters by calling the Adjust.addSessionPartnerParameter method:

Java
Javascript
Adjust.addSessionPartnerParameter("foo", "bar");

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 Adjust.removeSessionPartnerParameter method with the parameter key.

Java
Javascript
Adjust.removeSessionPartnerParameter("foo");

You can remove all session partner parameters if they are no longer required. To do this, call the Adjust.resetSessionPartnerParameters method.

Java
Javascript
Adjust.resetSessionPartnerParameters();

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 setDelayStart method.

Java
Javascript
adjustConfig.setDelayStart(5.5);

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 Adjust.sendFirstPackages method.

Java
Javascript
Adjust.sendFirstPackages();
Note:
You can delay the startup of the SDK by up to 10 seconds.