@dev-2-dev/websdk
v3.0.4
Published
Devtodev Analytics Web SDK
Readme
Devtodev Analytics Web SDK
Track user behavior, events, and engagement in your web application with the Devtodev Analytics SDK.
Installation
NPM Package
npm install @dev-2-dev/websdkCDN (Browser Only)
You can also include the SDK directly from our CDN without installing via npm:
<script src="https://cdn.devtodev.com/sdk/web/v3/devtodevsdk.js"></script>The SDK will be available globally as window.devtodev.
Quick Start
Using NPM Package
import DTDAnalytics from '@dev-2-dev/websdk';
// Create an instance
const analytics = new DTDAnalytics();
// Initialize with your app ID
analytics.initialize('your-app-id', {
userId: 'user-123', // Optional: set user ID during initialization
});Using CDN
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.devtodev.com/sdk/web/v3/devtodevsdk.js"></script>
</head>
<body>
<script>
const analytics = window.devtodev;
// Initialize with your app ID
analytics.initialize('your-app-id', {
userId: 'user-123',
});
</script>
</body>
</html>Documentation
For comprehensive documentation and detailed API reference, visit:
- Web SDK Integration Guide - Complete integration guide with all features and configuration options
- Devtodev Documentation - Full documentation portal
