Project mapping
Learn how track different types of events to different Engagement projects using the MAUI SDK
The SDK can track specified event types into multiple projects.
In the SDK configuration, you can optionally specify ProjectRouteMap
, a map of event types and projects into which you'd like to track events. A project is identified by its base URL, project token, and authorization token.
Events are always tracked both into the default project and into the project(s) specifically mapped to the event type.
Event types
You can use the following event types (defined in EventType.cs
) in the project mapping:
Event type | Description |
---|---|
Install | Fired once when the app is first installed. |
SessionStart | Used to mark the start of a session, typically when an app comes to the foreground. |
SessionEnd | Used to mark the end of a session, typically when an app goes to background. |
TrackEvent | Custom event tracking is used to report any custom events that you want. |
TrackCustomer | Tracking of customers is used to identify a current customer by some identifier. |
Payment | Virtual and hard payments can be tracked to better measure conversions, for example. |
PushToken | Event used for registering the push notifications token of the device with Bloomreach Engagement. |
PushDelivered | Tracks that a push notification has been delivered. |
PushOpened | Tracks that a push notification has been opened. |
CampaignClick | Tracks that a campaign button has been clicked. |
Banner | Tracks in-app message-related events. |
Example
If you want to track "push notification opened" events to projects project-a
and project-b
, you should configure the ProjectRouteMap
in the configuration object as:
var config = new Configuration("default-project", "default-api-key", "https://api.exponea.com");
config.ProjectRouteMap = new Dictionary<EventType, IList<Project>>() {
{
EventType.PushOpened,
new List<Project>() {
new Project(
projectToken: "project-a",
authorization: "api-key-a",
baseUrl: "https://api.exponea.com"
),
new Project(
projectToken: "project-b",
authorization: "api-key-b",
baseUrl: "https://api.exponea.com"
)
}
}
};
When a push notification is opened, the SDK will track the event three times with the same parameters, in different projects. That means that you will see the same event in the projects default-project
, project-a
, and project-b
.
Updated 24 days ago