English

Event tracking

You can use the Adjust SDK to track event information by associating an event with an event token. To do this, you will need to create event tokens for each event you want to track in the Adjust dashboard.

For example, if you wanted to track every tap on a button in your app, you would start by setting up an event token. You would then call on the trackEvent method with your event token every time the user taps the button.

Java
Javascript
AdjustEvent adjustEvent = new AdjustEvent("abc123");
Adjust.trackEvent(adjustEvent);

If you have logging enabled, you should see a message indicating that the SDK has logged the event.

Revenue tracking

You can use event tracking to track revenue-generating actions in your app. This includes ad engagements and in-app purchases. For example, if each tap is worth one Euro cent you could use the following to track the revenue event:

Java
Javascript
AdjustEvent adjustEvent = new AdjustEvent("abc123");
adjustEvent.setRevenue(0.01, "EUR");
Adjust.trackEvent(adjustEvent);

The currency token should be a three character string that follows the ISO 4217 standard. The Adjust backend will then convert the revenue into your chosen reporting currency. Check our guide to tracking purchases in different currencies for more information.

You can read more about revenue and event tracking in the event tracking guide.

Event deduplication

You can pass an optional identifier to avoid tracking duplicate events. The SDK stores the last ten identifiers. This means that it will skip over revenue events with duplicate transaction IDs. To set the identifier, call the AdjustEvent.setOrderId() method.

Java
Javascript
AdjustEvent adjustEvent = new AdjustEvent("abc123");
adjustEvent.setRevenue(0.01, "EUR");
adjustEvent.setOrderId("{OrderId}");
Adjust.trackEvent(adjustEvent);

In-App Purchase verification

You can use Purchase Verification to check the validity of in-app purchases. Check out our Android purchase verification SDK for details.

Callback parameters

You can register a callback URL for your events in the Adjust dashboard. The Adjust backend will send a GET request to that URL whenever the SDK tracks an event. You can add callback parameters to that event by calling the addCallbackParameter method on the event before tracking it. The Adjust backend will then append these parameters to your callback URL.

The SDK sends callback parameters to your servers. Once you configure parameters on an event, the SDK will append them to your callback URL. You can use this information to analyse your users' in-app behavior with your BI system.

For example, if you have registered the URL http://www.mydomain.com/callback, you can track an event like this:

Java
Javascript
AdjustEvent adjustEvent = new AdjustEvent("abc123");
adjustEvent.addCallbackParameter("key", "value");
adjustEvent.addCallbackParameter("foo", "bar");
Adjust.trackEvent(adjustEvent);

The Adjust SDK would track the event and send a request to your URL with the callback parameters.

http://www.mydomain.com/callback?key=value&foo=bar

If you are using CSV uploads, make sure to add the parameters to your CSV definition.

Adjust supports many placeholders which you can use to pass information from the SDK to your URL. For example, you can pass the device's Advertising ID using the {gps_adid} placeholder. The {publisher_parameter} placeholder presents all callback parameters in a single string.

Note:
Adjust does not store your custom callback parameters. Custom parameters are only appended to your callback URL.

You can read more about using URL callbacks, including a full list of available values, in our callbacks guide.

Partner parameters

You can send extra information to your network partners by adding partner parameters.

Adjust sends partner parameters to external partners you have set up. This information is useful for more granular analysis and retargeting purposes. The backend will forward these parameters once you have set them up and enabled them for a partner.

For example, you can pass product_id information with purchase events, or user_id with login events. Unlike callback parameters, partner parameters will not appear in raw data by default. You can add the {partner_parameters} placeholder to receive them as a single string.

Partner parameters work in a similar way to callback parameters. You can add them by calling the addPartnerParameter method on your event.

Java
Javascript
AdjustEvent adjustEvent = new AdjustEvent("abc123");
adjustEvent.addPartnerParameter("key", "value");
adjustEvent.addPartnerParameter("foo", "bar");
Adjust.trackEvent(adjustEvent);

Callback identifier

You can add a custom string identifier to each event you want to track. The Adjust backend can report on this identifier in event callbacks. This enables you to keep track of which events have been successfully tracked. You can set up this identifier by calling the setCallbackId method on your event.

Java
Javascript
AdjustEvent adjustEvent = new AdjustEvent("abc123");
adjustEvent.setCallbackId("Your-Custom-Id");
Adjust.trackEvent(adjustEvent);