adjust / unity_sdk

This is the Unity SDK of
http://www.adjust.com
MIT License
150 stars 72 forks source link

Feature Request: track event using event name instead of token #257

Open jacattrongnlh opened 1 year ago

jacattrongnlh commented 1 year ago

Feature Request

Please add an alternate method to Adjust.trackEvent(AdjustEvent adjustEvent) that allow passing in an event name instead of a token: Adjust.trackEventName(string eventName).

Example: instead of

AdjustEvent adjustEvent = new AdjustEvent("xc1a4c");
Adjust.trackEvent(adjustEvent);

You can use a method that uses event name directly

Adjust.trackEventName("Game_SettingButton_Tap");
int stageID; //stageID is set dynamically during runtime
Adjust.trackEventName($"Game_Complete_{stageID}");

Context

Currently, Adjust require using token to log event instead of using a plain text event name.

Adjust uses unique IDs, called event tokens, to track your events.

I don't see any advantage of doing it this way. It slows down integration and makes it impossible to log event with dynamic names.

Let's say product owner wants to log 30 custom events. Working with Adjust, the workflow will be:

This complicates the process and it's really hard to update. We have to do it everytime PO wants to log a new event.

Meanwhile, other event tracker like Firebase allow directly logging event using event name, no token. This has advantage of allowing dynamic event name, faster integration. The workflow is:

Dynamic event name: I want to log event with dynamic name like: Ad_{placementName}_LoadFailed. In the source code, there are many places that call function load ad, if I can log event with dynamic names, I can simply call the log event function and pass in a string that dynamically change based on where it was called. This is impossible to do with Adjust's event token workflow.