Integration Inventory
Native Integration Partners
Heap provides native integrations optimized for automatic event capture and behavioral analytics:
Marketing & Advertising
- Google Ads - Conversion tracking and audience sync
- Facebook Ads - Custom audience creation and optimization
- Marketo - Lead scoring and campaign attribution
- Salesforce Marketing Cloud - Journey orchestration
- Iterable - Behavioral email triggers
- Braze - Multi-channel engagement campaigns
CRM & Sales
- Salesforce - Lead qualification and opportunity tracking
- HubSpot - Contact enrichment and lifecycle stages
- Pipedrive - Deal tracking and sales attribution
- Zendesk - Customer support correlation
- Intercom - In-app messaging triggers
Data Warehouses
- Amazon Redshift - SQL-based analysis and reporting
- Google BigQuery - Cloud data warehouse integration
- Snowflake - Enterprise data platform connectivity
- Azure Synapse - Microsoft cloud analytics
Product & Analytics Tools
- Amplitude - Cross-platform behavioral analysis
- Mixpanel - Combined product analytics insights
- Segment - Customer data infrastructure
- mParticle - Data orchestration platform
- Optimizely - A/B testing and experimentation
Business Intelligence
- Looker - Custom dashboards and reporting
- Tableau - Data visualization and analysis
- Mode Analytics - SQL-based business intelligence
- Metabase - Self-service analytics platform
Heap Connect SQL
Direct SQL access to your Heap data for custom analysis and integration:
Supported Connections
- PostgreSQL-compatible drivers
- JDBC/ODBC connectivity
- Python, R, and JavaScript clients
- BI tool connectors (Tableau, Looker, Mode)
Query Capabilities
- Event-level data access
- User property filtering
- Session analysis
- Funnel queries
- Cohort definitions
API Access
Events API
- Server-side event tracking
- Offline event import
- Custom event properties
- User identity management
Connect API
- Programmatic data export
- Custom integration building
- Automated reporting workflows
- Data pipeline orchestration
Label API
- Automated event definition
- Tag management at scale
- Cross-environment synchronization
Licensing Requirements
Integration access varies by Heap plan tier:
| Feature | Growth | Pro | Premier |
|---|---|---|---|
| Native integrations | Limited | All | All + custom |
| Heap Connect SQL | - | Yes | Yes |
| API access | Basic | Full | Full + SLA |
| Data export frequency | Daily | Hourly | Real-time |
| Custom integration support | Community | Standard | Dedicated CSM |
| Row export limit | 100K/month | 1M/month | Unlimited |
Implementation Playbooks
Salesforce Integration Setup
Connect Heap with Salesforce for closed-loop attribution and lead enrichment:
Prerequisites
- Salesforce Administrator access
- Heap Admin or Owner role
- Heap identified users (via
heap.identify())
Setup Steps
- In Heap, navigate to Integrations > Salesforce
- Click "Connect to Salesforce"
- Authorize Heap to access your Salesforce org
- Configure sync settings:
- Select Salesforce objects (Leads, Contacts, Opportunities)
- Map Heap user properties to Salesforce fields
- Set sync direction (Heap → Salesforce, bidirectional)
- Enable sync and verify connection
User Identity Mapping
// Identify users in Heap to enable Salesforce sync
heap.identify('user_12345');
heap.addUserProperties({
'Email': 'user@example.com',
'Company': 'Acme Corp',
'Account_Type': 'Enterprise',
'MRR': 5000,
'Plan_Level': 'Pro'
});
// These properties will sync to Salesforce Lead/Contact fields
Automated Lead Enrichment
Configure Heap to automatically enrich Salesforce Leads with behavioral data:
// Track product engagement for lead scoring
heap.track('Feature Used', {
feature_name: 'Advanced Analytics',
usage_count: 15,
last_used: '2025-12-26'
});
// Heap syncs engagement score to Salesforce custom field
// Lead_Score__c updates automatically based on activity
Sync Configuration
Map Heap properties to Salesforce fields:
| Heap Property | Salesforce Field | Sync Direction |
|---|---|---|
| Bidirectional | ||
| Lifecycle Stage | Lead_Status__c | Heap → SF |
| Product Qualified Lead | PQL_Score__c | Heap → SF |
| Last Active Date | Last_Activity__c | Heap → SF |
| Total Sessions | Total_Sessions__c | Heap → SF |
| Feature Adoption Score | Feature_Score__c | Heap → SF |
QA Verification
- Identify test user in Heap with known email
- Trigger tracked events (feature usage, page views)
- Wait for sync cycle (typically 15 minutes)
- Verify Salesforce Lead/Contact updates
- Check sync logs in Heap for any errors
- Validate field mapping accuracy
BigQuery Export Setup
Export Heap data to BigQuery for advanced analysis and long-term storage:
Setup Process
- Create Google Cloud Platform project
- Enable BigQuery API and create dataset
- Create service account with BigQuery Data Editor role
- Download service account JSON key
- In Heap, navigate to Data > BigQuery Export
- Upload service account credentials
- Select dataset and configure export schedule
- Choose events and properties to export
Schema Design
Heap exports data in a denormalized format optimized for analysis:
-- Heap events table schema
CREATE TABLE heap_export.events (
event_id STRING,
session_id STRING,
user_id STRING,
time TIMESTAMP,
event_type STRING,
event_properties JSON,
user_properties JSON,
page_url STRING,
page_title STRING,
referrer STRING,
device_type STRING,
browser STRING,
platform STRING,
country STRING,
region STRING,
city STRING
);
-- Query: Feature adoption analysis
SELECT
user_properties.plan_level,
event_type,
COUNT(DISTINCT user_id) as users,
COUNT(*) as total_events,
COUNT(*) / COUNT(DISTINCT user_id) as avg_events_per_user
FROM
heap_export.events
WHERE
DATE(time) >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
AND event_type LIKE 'Feature:%'
GROUP BY
user_properties.plan_level,
event_type
ORDER BY
total_events DESC;
-- Query: Conversion funnel with drop-off analysis
WITH funnel_steps AS (
SELECT
session_id,
MAX(IF(event_type = 'Signup Started', 1, 0)) as started,
MAX(IF(event_type = 'Email Verified', 1, 0)) as verified,
MAX(IF(event_type = 'Profile Completed', 1, 0)) as completed,
MAX(IF(event_type = 'First Purchase', 1, 0)) as purchased
FROM
heap_export.events
WHERE
DATE(time) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
GROUP BY
session_id
)
SELECT
SUM(started) as step1_signup_started,
SUM(verified) as step2_email_verified,
SUM(completed) as step3_profile_completed,
SUM(purchased) as step4_first_purchase,
ROUND(SUM(verified) / SUM(started) * 100, 2) as started_to_verified,
ROUND(SUM(completed) / SUM(verified) * 100, 2) as verified_to_completed,
ROUND(SUM(purchased) / SUM(completed) * 100, 2) as completed_to_purchased
FROM
funnel_steps
WHERE
started = 1;
Export Scheduling
- Daily sync - Full historical export once per day
- Incremental sync - New events since last export
- Real-time streaming (Premier plan) - Events appear within minutes
Google Ads Integration
Sync Heap audiences to Google Ads for targeted remarketing:
Setup Steps
- In Heap, navigate to Integrations > Google Ads
- Authenticate with Google account
- Select Google Ads account to connect
- Create audiences in Heap based on user behavior
- Enable audience sync to Google Ads
- Wait 24-48 hours for initial population
Audience Creation Examples
// Define audiences in Heap UI or via API
// Example 1: High-value cart abandoners
{
"name": "High-Value Cart Abandoners",
"definition": {
"events": [
{
"type": "Add to Cart",
"properties": {
"cart_value": { "gt": 100 }
},
"within_days": 7
}
],
"exclude_events": [
{
"type": "Purchase",
"within_days": 7
}
]
}
}
// Example 2: Power users for upsell campaigns
{
"name": "Power Users - Upsell Ready",
"definition": {
"user_properties": {
"plan_type": "free",
"monthly_active_days": { "gte": 20 }
},
"events": [
{
"type": "Feature Used",
"count": { "gte": 50 },
"within_days": 30
}
]
}
}
Conversion Tracking
// Track Google Ads conversions in Heap
heap.track('Google Ads Conversion', {
campaign_id: '123456789',
campaign_name: 'Q4 Promotion',
ad_group: 'Product Features',
conversion_value: 129.99,
gclid: getUrlParameter('gclid')
});
// Helper function to extract gclid
function getUrlParameter(name) {
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
var results = regex.exec(location.search);
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
}
Data Activation
Behavioral Segmentation
Heap's automatic event capture enables sophisticated behavioral segmentation:
Engagement Scoring
-- Calculate engagement score using Heap Connect SQL
SELECT
user_id,
COUNT(DISTINCT DATE(time)) as active_days,
COUNT(DISTINCT session_id) as total_sessions,
COUNT(*) as total_events,
COUNT(DISTINCT event_type) as unique_event_types,
-- Engagement score formula
(COUNT(DISTINCT DATE(time)) * 5) +
(COUNT(DISTINCT session_id) * 2) +
(COUNT(DISTINCT event_type) * 10) as engagement_score
FROM
events
WHERE
time >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
GROUP BY
user_id
ORDER BY
engagement_score DESC
LIMIT 1000;
Lifecycle Stage Assignment
Automatically categorize users based on behavior patterns:
| Stage | Criteria | Heap Implementation |
|---|---|---|
| New User | 0-7 days since first session | days_since_first_seen <= 7 |
| Active | 3+ sessions in last 30 days | session_count_30d >= 3 |
| Power User | 15+ active days in last 30 days | active_days_30d >= 15 |
| At Risk | No activity in 14-30 days | days_since_last_seen BETWEEN 14 AND 30 |
| Churned | No activity in 30+ days | days_since_last_seen > 30 |
Personalization & Targeting
Intercom Integration for In-App Messaging
// Sync Heap user properties to Intercom
heap.addUserProperties({
'Product_Stage': 'Onboarding',
'Features_Adopted': 3,
'Trial_Days_Remaining': 12,
'Has_Invited_Team': false
});
// Intercom receives these properties automatically
// Create targeted messages based on Heap data
Custom Recommendations
Use Heap data to power product recommendations:
# Fetch user behavior from Heap Connect API
import requests
def get_user_recommendations(user_id):
# Query Heap for user's recent activity
query = f"""
SELECT event_type, COUNT(*) as frequency
FROM events
WHERE user_id = '{user_id}'
AND time >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
GROUP BY event_type
ORDER BY frequency DESC
LIMIT 10
"""
response = requests.post(
'https://heapanalytics.com/api/connect/query',
headers={'Authorization': f'Bearer {API_KEY}'},
json={'query': query}
)
# Generate recommendations based on behavior
events = response.json()
return generate_recommendations(events)
Marketing Automation
Automated Campaign Triggers
Sync Heap events to marketing platforms for behavioral triggers:
// Trigger email campaigns based on user actions
heap.track('Trial Expiring Soon', {
user_email: 'user@example.com',
trial_end_date: '2025-12-31',
features_used: 8,
plan_recommended: 'Pro'
});
// Iterable/Braze receives event and triggers:
// - Day 3: Feature education emails
// - Day 5: Success story case study
// - Day 7: Pricing and upgrade CTA
Conversion Path Analysis
Identify optimal touchpoints for campaign optimization:
-- Analyze successful conversion paths
WITH conversion_paths AS (
SELECT
user_id,
ARRAY_AGG(event_type ORDER BY time) as event_sequence
FROM
events
WHERE
session_id IN (
SELECT DISTINCT session_id
FROM events
WHERE event_type = 'Purchase'
)
GROUP BY
user_id
)
SELECT
event_sequence,
COUNT(*) as path_frequency,
COUNT(*) * 100.0 / SUM(COUNT(*)) OVER() as path_percentage
FROM
conversion_paths
GROUP BY
event_sequence
ORDER BY
path_frequency DESC
LIMIT 20;
Refresh Cadences & Ownership
Data Sync Schedules
| Integration | Sync Frequency | Latency | Notes |
|---|---|---|---|
| Salesforce | 15 minutes | Real-time | Bidirectional sync |
| Google Ads Audiences | Real-time | 24-48 hours initial | Then updates hourly |
| BigQuery Export | Daily/Hourly | Batch schedule | Configurable by plan |
| Marketo | 30 minutes | Near real-time | Event-based triggers |
| Segment | Real-time | < 1 minute | Streaming integration |
| Webhook Destinations | Real-time | < 30 seconds | Event streaming |
Team Responsibilities
- Product Team - Define events, create segments, build funnels
- Marketing Team - Audience creation, campaign targeting, A/B testing
- Data Team - BigQuery setup, SQL analysis, data modeling
- Engineering Team - Custom integrations, API implementation, technical troubleshooting
- RevOps Team - Salesforce sync, lead scoring, attribution models
Compliance & Security
Data Governance
PII Management
Heap automatically captures user interactions but requires careful PII handling:
// Recommended: Use opaque identifiers
heap.identify('user_8a7d9f23');
// Add properties without PII
heap.addUserProperties({
'Account_Type': 'Enterprise',
'Industry': 'Technology',
'Company_Size': '500-1000',
'Region': 'North America'
});
// AVOID: Capturing PII in event properties
// DON'T DO THIS:
heap.track('Form Submitted', {
'email': 'user@example.com', // PII - don't track
'ssn': '123-45-6789', // Sensitive - never track
'credit_card': '4111-1111' // Highly sensitive - never track
});
Data Masking
Configure Heap to automatically mask sensitive data:
- Navigate to Heap Settings > Data Masking
- Add CSS selectors for sensitive form fields
- Enable automatic masking for common PII patterns
- Test masking in Heap debugger
Data Retention Policies
- Event data: Configurable retention (2-7 years based on plan)
- User data: Retained until deletion request
- Session replays: 90 days default, configurable up to 1 year
Privacy Compliance
GDPR Compliance
// Implement consent management
if (userConsent.analytics) {
heap.load('YOUR-ENV-ID');
} else {
// Don't load Heap until consent granted
console.log('Analytics consent not provided');
}
// Handle data deletion requests
function deleteUserData(userId) {
// Contact Heap support or use deletion API
fetch('https://heapanalytics.com/api/user/delete', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
user_id: userId
})
});
}
CCPA & Regional Compliance
- Enable opt-out mechanisms
- Provide data export capabilities
- Document data sharing with third parties
- Maintain data processing agreements
Integration Security
API Key Management
- Store API keys in environment variables or secret managers
- Use separate keys for production, staging, and development
- Rotate keys quarterly
- Implement least-privilege access
Service Account Best Practices
# For BigQuery integration
# Create dedicated service account
gcloud iam service-accounts create heap-bigquery-export \
--display-name="Heap BigQuery Export"
# Grant minimal required permissions
gcloud projects add-iam-policy-binding PROJECT_ID \
--member="serviceAccount:heap-bigquery-export@PROJECT_ID.iam.gserviceaccount.com" \
--role="roles/bigquery.dataEditor"
# Create key with expiration monitoring
gcloud iam service-accounts keys create heap-bq-key.json \
--iam-account=heap-bigquery-export@PROJECT_ID.iam.gserviceaccount.com
Backlog & Opportunities
Requested Integrations
High Priority
- Snowflake Direct Connector - Native Snowflake integration without BigQuery intermediary (Engineering: 4 weeks, High impact)
- Microsoft Dynamics 365 - CRM integration for enterprise clients (Engineering: 5 weeks, Medium impact)
- LinkedIn Ads - B2B audience targeting and conversion tracking (Engineering: 2 weeks, High impact)
Medium Priority
- Zendesk Support Triggers - Automated support workflows based on product usage (Engineering: 3 weeks, Medium impact)
- Slack Notifications - Real-time alerts for user milestones and anomalies (Engineering: 1 week, Low impact)
- Airtable Sync - Lightweight workflow automation (Engineering: 2 weeks, Low impact)
Exploration Phase
- Reverse ETL - Hightouch, Census integration for warehouse-first architecture
- Data Observability - Monte Carlo, Datafold integration for data quality
- Customer Success - Gainsight, ChurnZero integration for health scoring
Technical Improvements
Enhanced Data Exports
- Implement incremental sync for all warehouse integrations
- Add support for custom event property filtering in exports
- Build automated data quality checks for synced data
- Create pre-built dbt models for common analyses
API Enhancements
- Develop official SDKs for Python, Node.js, and Ruby
- Add GraphQL API for flexible data querying
- Implement webhook replay functionality for failed deliveries
- Build integration testing framework
Feature Requests
Track and prioritize integration enhancement requests:
| Request | Use Case | Effort | Impact | Status |
|---|---|---|---|---|
| Real-time Webhook Streaming | Instant event activation | 3 weeks | High | In Review |
| Custom Object Sync (Salesforce) | Sync to custom SF objects | 4 weeks | Medium | Backlog |
| Audience Size Prediction | Forecast audience growth | 2 weeks | Medium | Planning |
| Multi-workspace BigQuery | Export multiple envs to one BQ | 2 weeks | Low | Backlog |