integrationlatestIntegration / Multiple instances
Multiple instances
If you want to send data to multiple projects in your business, you can use the multiple instances feature that we provide.
To create multiple SDK instances, initialize the SDK with different project information.
//Initialize multiple APPID instances
TDAnalytics::init(TA_APP_ID, TA_SERVER_URL);
TDAnalytics::init(TA_APP_ID_1, TA_SERVER_URL_1);
//Track data with multiple instances
TDJSONObject eventProperties;
eventProperties.setString("product_name", "Product Name");
TDAnalytics::track("product_buy", eventProperties, TA_APP_ID_1);
The distinct ID, account ID, super properties, and so on are not shared among projects. You need to set them separately for each APP ID instance.
Was this page helpful?

