User Acquisition
Available web attribution SDKs
Web attribution SDKs
Web attribution SDKs allows to attributes user acquires (instead of installs for normal apps) to some campaigns, and do post-backs to make optimization algorithms to work properly.
We are supporting following web attribution SDKs:
To enable one of these web SDKs with N2I, you only need to get the ID from the web SDK dashboard (for example Web SDK ID for AppsFlyer), and send it to us. We will then enable the code on our frontend.
Web specific events
In addition of your application events, we define some web specific events:
| Event name | Description |
|---|---|
| first_visit_from_pwa | user launched the web game for the first time from icon shortcut installed on homescreen |
| pwa_installed | user installed the web game on homescreen as an icon shortcut |
Advanced
Custom n2i:// links (advanced)
Custom n2i:// links let the streamed application communicate with the enabled web attribution SDKs directly. The N2I frontend intercepts these links and forwards each call to the appropriate attribution SDK.
Available tracker names are appsflyer, adjust and singular.
Set customer user ID — n2i://tracker/config
Use this link to set the customer user ID on a specific attribution SDK. Call it after a user logs in or as soon as you have a stable user identifier that the attribution provider should associate with future events.
Parameters:
-
tracker— the SDK name, for exampleappsflyer -
userId— the customer user ID
Example URL:
n2i://tracker/config?tracker=appsflyer&userId=12345678
Send a single event — n2i://tracker/event
Use this link to send one event to one or more attribution SDKs. If you omit trackers, N2I sends the event to all attribution SDKs enabled on your instance.
Parameters:
-
trackers— optional comma-separated SDK names -
name— event name -
value— event value, either a plain string or a URL-encoded base64 JSON object
Example URL with a plain value sent to specific trackers:
n2i://tracker/event?trackers=appsflyer,singular&name=my-event&value=my-value
Example URL with a base64-encoded JSON value sent to all trackers:
n2i://tracker/event?name=my-event&value=eyJmb28iOiJiYXIifQ%3D%3D
The base64 value in the second example decodes to:
{
"foo": "bar"
}
Use a base64 JSON value when you need to send structured event data instead of a single string. The value must be URL-encoded in the link, so padding characters such as = become %3D.
Send multiple events — n2i://tracker/events
Use this link to send multiple events in a single call. Each query parameter key is an event name, and each value is a URL-encoded base64 JSON object containing that event's parameters.
Example URL:
n2i://tracker/events?my-event=eyJmb28iOiJiYXIifQ%3D%3D
The my-event value in this example decodes to:
{
"foo": "bar"
}
This pattern is useful when you need to batch several events at once, such as when a level completes or when a session ends.
RPC calls — n2i://tracker/rpc
Use this link to invoke a named method on the attribution SDK with a base64-encoded JSON payload. This is useful for SDK-specific methods that go beyond simple event tracking, such as sendEvent with structured event values.
Parameters:
-
name— the method name to invoke -
value— URL-encoded base64 JSON payload
Example URL:
n2i://tracker/rpc?name=sendEvent&value=eyJldmVudE5hbWUiOiJteS1ldmVudCIsImV2ZW50VmFsdWVzIjp7ImtleTEiOiJ2YWx1ZTEiLCJrZXkyIjoidmFsdWUyIn19
Decoded JSON payload:
{
"eventName": "my-event",
"eventValues": {
"key1": "value1",
"key2": "value2"
}
}
sendEvent is the standard RPC method for sending structured events with multiple key-value parameters to the SDK.
Base64 values must be URL-encoded in the link, so padding = characters become %3D. Available tracker names match the attribution SDKs enabled on your instance, such as appsflyer, adjust, and singular.