You can safely keep raw tracking calls in your code when adopting Codegen. In this case we recommend to migrate gradually, following 2 steps below.
Mark the new events you want to implement with Avo Codegen as "Implement with Codegen" in the Avo workspace and they will appear as functions in the generated code.
Initiate Codegen with a destination interface.
In the track methods of the destination interface (logEvent, identify etc.) you use your existing tracking SDK instance to track events:
pseudocodeCopy1234logEvent(eventName, eventProperties) {// Log event in your destinationanalytics.track(eventName, eventProperties)}
With this one time setup the events you track with Codegen will be sent to the same analytics destinations as your existing events.
Going forward you'll be able to gradually swap old events implemented with raw analytics SDK with Avo implementation at your own pace by: