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 typeDescription
InstallFired once when the app is first installed.
SessionStartUsed to mark the start of a session, typically when an app comes to the foreground.
SessionEndUsed to mark the end of a session, typically when an app goes to background.
TrackEventCustom event tracking is used to report any custom events that you want.
TrackCustomerTracking of customers is used to identify a current customer by some identifier.
PaymentVirtual and hard payments can be tracked to better measure conversions, for example.
PushTokenEvent used for registering the push notifications token of the device with Bloomreach Engagement.
PushDeliveredTracks that a push notification has been delivered.
PushOpenedTracks that a push notification has been opened.
CampaignClickTracks that a campaign button has been clicked.
BannerTracks 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.