Amplitude कनेक्टर

marketing automation के लिए product analytics data का उपयोग करने हेतु Tajo के माध्यम से Amplitude को Brevo से कनेक्ट करें। targeted campaigns चलाने के लिए behavioral cohorts, user properties, और product events को sync करें।

अवलोकन

PropertyValue
PlatformAmplitude
CategoryAnalytics (Custom)
Setup ComplexityMedium
Official IntegrationNo
Data SyncedEvents, Users, Cohorts, Properties
Available Skills6

विशेषताएं

  • Event forwarding - marketing automation triggers के लिए Amplitude track events को Brevo में भेजें
  • Cohort sync - Amplitude behavioral cohorts को Brevo contact lists के रूप में export करें
  • User property sync - Amplitude user properties को Brevo contact attributes से map करें
  • Revenue tracking - customer lifetime value analysis के लिए revenue events sync करें
  • Behavioral segmentation - Brevo segments में Amplitude engagement data का उपयोग करें
  • HTTP V2 API integration - Amplitude के HTTP V2 ingestion API के साथ सीधा integration

पूर्वावश्यकताएं

शुरू करने से पहले, सुनिश्चित करें कि आपके पास हैं:

  1. एक project के साथ एक Amplitude account
  2. आपकी Amplitude API Key और Secret Key
  3. API access वाला एक Brevo account
  4. API credentials के साथ एक Tajo account

प्रमाणीकरण

Amplitude API Keys

Amplitude authentication के लिए API Key और Secret Key pairs का उपयोग करता है। API Key आपके project की पहचान करती है, जबकि Secret Key server-side requests को authenticate करती है।

Terminal window
# Amplitude में अपनी keys खोजें:
# Settings > Projects > [Your Project] > General

HTTP V2 API Authentication

HTTP V2 API request body में API key का उपयोग करता है:

Terminal window
curl -X POST https://api2.amplitude.com/2/httpapi \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_AMPLITUDE_API_KEY",
"events": [...]
}'

कॉन्फ़िगरेशन

बेसिक सेटअप

connectors:
amplitude:
enabled: true
api_key: "your-amplitude-api-key"
secret_key: "your-amplitude-secret-key"
data_center: "US" # or "EU"
# Data sync options
sync:
events: true
user_properties: true
cohorts: true
revenue: true
# Brevo list assignment
lists:
active_users: 10
power_users: 11
churning_users: 12

Event Mapping

Amplitude events को Brevo automation triggers से map करें:

event_mapping:
# Amplitude event -> Brevo event
"Purchase": "order_completed"
"Sign Up": "customer_created"
"Add to Cart": "cart_updated"
"Page View": "page_viewed"
"Feature Click": "feature_used"
# Revenue events
"Revenue": "revenue_event"
"Subscription Started": "subscription_created"

User Property Mapping

Amplitude user properties को Brevo contact attributes से map करें:

property_mapping:
# Amplitude property -> Brevo attribute
email: email
first_name: FIRSTNAME
last_name: LASTNAME
phone: SMS
plan_type: PLAN
signup_date: SIGNUP_DATE
total_purchases: ORDER_COUNT
lifetime_revenue: LTV
last_active: LAST_ACTIVE
device_type: DEVICE

API Endpoints

MethodEndpointविवरण
POST/2/httpapievents upload करें (HTTP V2 API)
POST/batchevents का bulk upload (Batch API)
POST/identifyuser properties सेट करें
POST/groupidentifygroup properties सेट करें
GET/2/exportraw event data export करें
GET/2/usersearchusers खोजें
GET/2/useractivityuser activity timeline प्राप्त करें
POST/api/3/cohort/exportcohort members export करें
GET/api/3/chart/{chart_id}/querysaved chart data क्वेरी करें

कोड उदाहरण

Amplitude कनेक्टर शुरू करें

import { TajoClient } from '@tajo/sdk';
const tajo = new TajoClient({
apiKey: process.env.TAJO_API_KEY,
brevoApiKey: process.env.BREVO_API_KEY
});
// Amplitude project कनेक्ट करें
await tajo.connectors.connect('amplitude', {
apiKey: process.env.AMPLITUDE_API_KEY,
secretKey: process.env.AMPLITUDE_SECRET_KEY,
dataCenter: 'US'
});

HTTP V2 API के माध्यम से Events भेजें

// Amplitude को events भेजें (स्वचालित रूप से Brevo को forward होते हैं)
const response = await fetch('https://api2.amplitude.com/2/httpapi', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
api_key: process.env.AMPLITUDE_API_KEY,
events: [
{
user_id: "user_123",
event_type: "Purchase",
event_properties: {
revenue: 89.99,
product_id: "SKU-001",
product_name: "Widget Pro"
},
user_properties: {
$set: {
plan_type: "premium"
}
},
time: Date.now()
}
]
})
});
// अपेक्षित response: { "code": 200, "events_ingested": 1 }

Cohort को Brevo List से Sync करें

// Amplitude cohort को export करें और Brevo से sync करें
const cohort = await tajo.connectors.syncCohort('amplitude', {
cohortId: 'abc123',
targetList: 11, // Brevo list ID
syncMode: 'mirror' // mirror, append, or remove
});
console.log(cohort);
// {
// cohortName: "Power Users",
// membersCount: 2450,
// syncedToBrevo: 2450,
// listId: 11
// }

Rate Limits

APILimitविवरण
HTTP V2 API1,000 events/secप्रति project, burst 2,000/sec तक
Batch API1,000 events/batchअधिकतम 20 batches/sec
Identify API1,000 req/secप्रति project
Export API360 requests/hourप्रति project
Cohort Export1 concurrent exportप्रति cohort
Dashboard REST API360 requests/hourप्रति project

Event Size Limits

प्रत्येक event payload 1 MB से अधिक नहीं हो सकता। HTTP V2 API प्रति request 2,000 events तक और अधिकतम 20 MB body size स्वीकार करता है।

समस्या निवारण

समस्याकारणसमाधान
Events invalid status लौटाते हैंआवश्यक fields गायबसुनिश्चित करें कि हर event पर user_id या device_id सेट हो
User properties sync नहीं हो रहेगलत property operatorसेट करने के लिए $set, first-touch values के लिए $setOnce का उपयोग करें
Cohort export खालीCohort अभी compute हो रहा हैexport से पहले cohort computation पूरा होने की प्रतीक्षा करें
429 Too Many RequestsRate limit पारexponential backoff लागू करें और batch API का उपयोग करें
Revenue ट्रैक नहीं हो रहाRevenue fields गायबevent properties में price, quantity, और revenue शामिल करें
EU data route नहीं हो रहागलत data centerdata_center: "EU" सेट करें और api.eu.amplitude.com का उपयोग करें

सर्वोत्तम प्रथाएं

  1. HTTP V2 API का उपयोग करें - बेहतर validation और error responses के लिए legacy HTTP API की तुलना में V2 API को प्राथमिकता दें
  2. Events को batch करें - इष्टतम throughput के लिए 1,000 तक के batches में events भेजें
  3. Events पर user properties सेट करें - identify कॉल कम करने के लिए track events पर user_properties शामिल करें
  4. Segmentation के लिए cohorts का उपयोग करें - जटिल segmentation logic की प्रतिलिपि बनाने के बजाय behavioral cohorts sync करें
  5. Revenue events को सही तरीके से ट्रैक करें - सटीक revenue tracking के लिए revenue, price, और productId fields का उपयोग करें
  6. Ingestion health monitor करें - event validation errors के लिए Amplitude के Ingestion Debugger की जांच करें
  7. Server-side tracking लागू करें - विश्वसनीय event delivery के लिए server-side SDKs का उपयोग करें

सुरक्षा

  • HTTPS only - सभी API communication के लिए TLS 1.2+ आवश्यक
  • API key rotation - Amplitude settings के माध्यम से Secret Keys को समय-समय पर rotate करें
  • IP allowlisting - Enterprise plans पर उपलब्ध
  • SOC 2 Type II - Amplitude SOC 2 Type II certified है
  • GDPR/CCPA - user data deletion और export requests के लिए समर्थन
  • EU data residency - EU data center विकल्प उपलब्ध

संबंधित संसाधन

Subscribe to updates

developer-docs

Drop your email or phone number — we'll send you what matters next.

auto-detect
AI Assistant

Hi! Ask me anything about the docs.