@@ -63,6 +63,9 @@ public VWOClient(String settings, VWOBuilder vwoBuilder) {
6363 if (vwoBuilder .getBatchEventQueue () != null ) {
6464 vwoBuilder .getBatchEventQueue ().setSettings (this .processedSettings );
6565 }
66+ if (!DataTypeUtil .isNull (this .processedSettings .getCollectionPrefix ()) && !this .processedSettings .getCollectionPrefix ().isEmpty ()) {
67+ this .vwoBuilder .getSettingsManager ().collectionPrefix = this .processedSettings .getCollectionPrefix ();
68+ }
6669 SettingsUtil .processSettings (this .processedSettings , this .vwoBuilder .getLoggerService ());
6770 } catch (Exception exception ) {
6871 System .err .println ("exception occurred while parsing settings " + exception .getMessage ());
@@ -73,7 +76,7 @@ public VWOClient(String settings, VWOBuilder vwoBuilder) {
7376 * This method is used to send the sdk init event
7477 * @param settingsInitTime The time taken to initialize the settings
7578 */
76- protected void sendSdkInitEvent (long settingsInitTime ) {
79+ protected void sendSdkInitAndUsageStatsEvent (long settingsInitTime ) {
7780 try {
7881 if ( this .processedSettings == null ) {
7982 throw new IllegalStateException ("processedSettings is null" );
@@ -89,6 +92,12 @@ protected void sendSdkInitEvent(long settingsInitTime) {
8992 EventUtil .sendSdkInitEvent (this .vwoBuilder .getSettingsManager (), this .vwoBuilder .getSettingsManager ().settingsFetchTime , settingsInitTime , EventEnum .VWO_SDK_INIT_EVENT .getValue ());
9093 }
9194 }
95+
96+ // get usage stats account id from settings
97+ Integer usageStatsAccountId = this .processedSettings .getUsageStatsAccountId ();
98+ if (!DataTypeUtil .isNull (usageStatsAccountId ) && usageStatsAccountId != 0 ) {
99+ EventUtil .sendUsageStatsEvent (this .vwoBuilder .getSettingsManager (), usageStatsAccountId );
100+ }
92101 } catch (Exception exception ) {
93102 vwoBuilder .getLoggerService ().log (LogLevelEnum .ERROR , "SDK_INIT_EVENT_FAILED" , new HashMap <String , Object >() {{
94103 put ("err" , exception .getMessage ());
0 commit comments