Mixpanel कनेक्टर

product analytics को marketing automation के साथ जोड़ने के लिए Tajo के माध्यम से Mixpanel को Brevo से कनेक्ट करें। वास्तविक product usage के आधार पर data-driven campaigns बनाने के लिए user profiles, behavioral events, और cohorts sync करें।

अवलोकन

PropertyValue
PlatformMixpanel
CategoryAnalytics (Custom)
Setup ComplexityMedium
Official IntegrationNo
Data SyncedEvents, Profiles, Cohorts, Groups
Available Skills7

विशेषताएं

  • Event ingestion - Mixpanel के Ingestion API के माध्यम से track events को Brevo workflows में import करें
  • User profile sync - Mixpanel user profile properties को Brevo contact attributes से map करें
  • Cohort export - targeted campaigns के लिए Mixpanel cohorts को Brevo contact lists में sync करें
  • Group analytics - B2B account-based marketing के लिए group-level data sync करें
  • Identity management - एकीकृत customer profiles के लिए Mixpanel के identity merge का लाभ उठाएं
  • JQL queries - Brevo के लिए विशिष्ट data sets निकालने हेतु custom JQL queries चलाएं
  • Lookup tables - Mixpanel lookup tables से enrichment data sync करें

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

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

  1. एक project के साथ एक Mixpanel account
  2. client-side tracking के लिए आपका Mixpanel Project Token
  3. server-side API access के लिए उपयुक्त permissions वाला एक Service Account
  4. API access वाला एक Brevo account
  5. API credentials के साथ एक Tajo account

प्रमाणीकरण

Service Accounts (अनुशंसित)

Mixpanel API authentication के लिए Service Accounts का उपयोग करने की अनुशंसा करता है। Service accounts username (service account username) और password (service account secret) के साथ HTTP Basic Auth का उपयोग करते हैं।

Terminal window
# Service Account authentication
curl https://mixpanel.com/api/app/me \
-u "SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET"

Project Token

Project Token का उपयोग client-side event tracking के लिए किया जाता है और इसे client code में शामिल करना सुरक्षित है:

// Client-side initialization
mixpanel.init("YOUR_PROJECT_TOKEN");

OAuth (Partner Integrations के लिए)

कई projects तक पहुंचने वाले app integrations के लिए:

Terminal window
curl https://mixpanel.com/api/2.0/engage \
-H "Authorization: Bearer YOUR_OAUTH_TOKEN"

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

बेसिक सेटअप

connectors:
mixpanel:
enabled: true
project_token: "your-project-token"
service_account:
username: "your-service-account-username"
secret: "your-service-account-secret"
project_id: "12345"
data_residency: "US" # or "EU"
# Data sync options
sync:
events: true
profiles: true
cohorts: true
groups: false
# Brevo list assignment
lists:
all_users: 15
engaged_users: 16
at_risk: 17

Event Mapping

Mixpanel events को Brevo event types से map करें:

event_mapping:
# Mixpanel event -> Brevo event
"Purchase": "order_completed"
"Sign Up": "customer_created"
"Add to Cart": "cart_updated"
"Page View": "page_viewed"
"$experiment_started": "experiment_started"
# Custom events
"Feature Activated": "feature_used"
"Subscription Renewed": "subscription_renewed"

Profile Property Mapping

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

property_mapping:
$email: email
$first_name: FIRSTNAME
$last_name: LASTNAME
$phone: SMS
$city: CITY
$region: REGION
$country_code: COUNTRY
plan: PLAN_TYPE
company: COMPANY
signup_date: SIGNUP_DATE
total_revenue: LTV

API Endpoints

MethodEndpointविवरण
POST/importEvents import करें (Ingestion API)
POST/trackEvents ट्रैक करें (client-side)
POST/engage#$setuser profile properties सेट करें
POST/engage#$set_onceproperties केवल तभी सेट करें जब पहले से सेट न हो
POST/engage#$deleteएक user profile हटाएं
POST/engage#$unionlist properties में Union
POST/groupsgroup profile properties सेट करें
GET/exportraw event data export करें
POST/cohorts/listsaved cohorts list करें
POST/engage/queryuser profiles क्वेरी करें
POST/jqlcustom JQL queries चलाएं
GET/segmentationsegmentation reports क्वेरी करें
GET/retentionretention reports क्वेरी करें
GET/funnelsfunnel reports क्वेरी करें

कोड उदाहरण

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

import { TajoClient } from '@tajo/sdk';
const tajo = new TajoClient({
apiKey: process.env.TAJO_API_KEY,
brevoApiKey: process.env.BREVO_API_KEY
});
// Mixpanel project कनेक्ट करें
await tajo.connectors.connect('mixpanel', {
projectToken: process.env.MIXPANEL_TOKEN,
serviceAccountUser: process.env.MIXPANEL_SA_USER,
serviceAccountSecret: process.env.MIXPANEL_SA_SECRET,
projectId: process.env.MIXPANEL_PROJECT_ID
});

Ingestion API के माध्यम से Events Import करें

// Mixpanel में events import करें (स्वचालित रूप से Brevo को forward होते हैं)
const response = await fetch('https://api.mixpanel.com/import', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic ' + btoa(
`${process.env.MIXPANEL_SA_USER}:${process.env.MIXPANEL_SA_SECRET}`
)
},
body: JSON.stringify([
{
event: "Purchase",
properties: {
distinct_id: "user_123",
$insert_id: "evt_abc123",
time: Math.floor(Date.now() / 1000),
revenue: 89.99,
product_id: "SKU-001",
product_name: "Widget Pro"
}
}
])
});
// अपेक्षित response: { "code": 200, "status": "OK", "num_records_imported": 1 }

Cohort को Brevo से Sync करें

// एक Mixpanel cohort export करें और Brevo list से sync करें
const cohort = await tajo.connectors.syncCohort('mixpanel', {
cohortId: 12345,
targetList: 16,
syncMode: 'mirror'
});
console.log(cohort);
// {
// cohortName: "Engaged Users (Last 7 Days)",
// membersCount: 3200,
// syncedToBrevo: 3200,
// listId: 16
// }

User Profile Properties सेट करें

// Engage API के माध्यम से user properties सेट करें
const response = await fetch('https://api.mixpanel.com/engage#$set', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify([{
$token: process.env.MIXPANEL_TOKEN,
$distinct_id: "user_123",
$set: {
$email: "[email protected]",
$first_name: "Jane",
$last_name: "Kim",
plan: "premium",
total_orders: 12,
lifetime_value: 1250.00
}
}])
});

Rate Limits

APILimitविवरण
Ingestion API2 GB/minप्रति project
Track APIकोई hard limit नहींBest-effort delivery
Engage API2,000 updates/batchप्रति project अधिकतम 2 GB/min
Query API60 requests/hourप्रति project (Service Account)
Export API60 requests/hourप्रति query अधिकतम 100 दिन
JQL API60 requests/hourप्रति project
Cohort Export60 requests/hourप्रति project

Event Deduplication

Mixpanel $insert_id property का उपयोग करके events को deduplicate करता है। failed imports को retry करते समय duplicate events को रोकने के लिए हमेशा एक unique $insert_id शामिल करें।

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

समस्याकारणसमाधान
Events दिखाई नहीं दे रहेगलत project tokenसत्यापित करें कि token target project से मेल खाता है
Profile properties गायबगलत API का उपयोगprofile properties के लिए /track के बजाय /engage#$set का उपयोग करें
Cohort export failअपर्याप्त permissionsसुनिश्चित करें कि Service Account की Admin या Analyst role है
Duplicate eventsगायब $insert_idहर event पर unique $insert_id शामिल करें
402 Payment Requireddata limits से अधिकMixpanel plan limits जांचें और आवश्यकता होने पर upgrade करें
EU data route नहीं हो रहागलत data residencyEU projects के लिए api-eu.mixpanel.com का उपयोग करें
Identity merge समस्याएंगलत distinct_idMixpanel की identity management सर्वोत्तम प्रथाओं का पालन करें

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

  1. Service Accounts का उपयोग करें - server-side authentication के लिए Project Secret की तुलना में Service Accounts को प्राथमिकता दें
  2. $insert_id शामिल करें - event deduplication के लिए हमेशा एक unique insert ID सेट करें
  3. Profile updates batch करें - efficiency के लिए प्रति request 2,000 तक profile updates भेजें
  4. EU endpoints का उपयोग करें - EU data residency के लिए, सभी API calls के लिए api-eu.mixpanel.com का उपयोग करें
  5. Schedule पर cohorts sync करें - continuous polling के बजाय daily या weekly cohort sync सेट करें
  6. Reserved properties को map करें - profile data के लिए Mixpanel की reserved properties ($email, $first_name) का उपयोग करें
  7. Ingestion monitor करें - यह सत्यापित करने के लिए कि events सही ढंग से प्राप्त हो रहे हैं, Mixpanel के Events page का उपयोग करें

सुरक्षा

  • HTTPS only - सभी API communication के लिए TLS encryption आवश्यक
  • Service Account isolation - role-based permissions के साथ प्रति project scoped access
  • Event deduplication - $insert_id के माध्यम से built-in dedup data integrity समस्याओं को रोकता है
  • SOC 2 Type II - Mixpanel SOC 2 Type II certified है
  • GDPR/CCPA - GDPR API के माध्यम से user data deletion को support करता है
  • EU data residency - European compliance के लिए 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.