Skip to main content

FAQ

Which package should I install?

Install the SDK package:

npm install @drivemetadata-ai/sdk

Then import the runtime entry point you need.

Which import path should I use?

Use @drivemetadata-ai/sdk/browser for plain browser apps, @drivemetadata-ai/sdk/react for React, @drivemetadata-ai/sdk/next for Next.js, @drivemetadata-ai/sdk/angular for Angular, com.drivemetadata:dmd-android-sdk for Android apps, DriveMetaDataiOSSDK for iOS apps, react-native-drivemetadata for React Native apps, and @drivemetadata-ai/sdk/node for backend services.

Can I use the Node SDK in a browser bundle?

No. The Node SDK is for backend/server events only. Do not import @drivemetadata-ai/sdk/node from browser bundles, React client components, Angular browser bundles, or Next.js client components.

Which credentials are safe for frontend code?

Frontend integrations should use only public browser values such as clientId, workspaceId, appId, and a public browser token. Server tokens must stay in backend-only environment variables.

Which credentials are safe for mobile apps?

Use mobile client credentials provisioned for the Android, iOS, or React Native source. Do not place backend/server tokens in application code, resources, or build configuration shipped to users.

Should browser analytics initialize during SSR?

No. Browser analytics must initialize only in the browser runtime. In Next.js, put SDK setup inside a client component and use the Next.js integration helpers for route tracking.

If analytics consent is omitted, analytics defaults to pending and events are dropped until consent is granted. Start with pending or denied, then update consent after your consent manager resolves.

How do I debug missing events?

Call getDmdHealth() and flush() during integration testing. Health diagnostics report initialized state, consent state, queue size, offline state, dropped-event count, last error, and last dropped-event reason.

For Android, confirm the SDK is initialized in the Application class, verify the manifest internet permission, register callbacks if needed, and enable debug logs only in non-production builds.

Can mobile apps call the REST ingestion API directly?

No. REST ingestion is for trusted server-side systems. Mobile apps should use the Android, iOS, or React Native SDKs.

Where do event names come from?

Use your approved DriveMetaData ingestion model. The event types guide includes starter names by industry.

Which timestamp format does the backend receive?

Collector payload timestamps use UTC YYYY-MM-DD HH:mm:ss format without milliseconds or timezone suffix. Invalid timestamp strings are normalized before delivery.

Where should I start?

Start with the integration guide, then use the runtime-specific guide for your app.