Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 693 Bytes

README.md

File metadata and controls

29 lines (21 loc) · 693 Bytes

heapanalytics-python

A module for using the HeapAnalytics Server-Side API (https://heapanalytics.com/docs/server-side).

The heapanalytics package allows you to easily track events and update user properties from your python application.

Getting Started

The HeapAnalytics class is the primary class for tracking events and sending user updates.

from heapanalytics import HeapAnalytics

app_id = "XXXXXXXXXX"
heap = HeapAnalytics(app_id)

# Send an event
heap.track('12345', 'Welcome email sent', {'Email': '[email protected]'})

# Update user profile
heap.identify(
    '12345',
    {
        'First name': 'John',
        'Last name': 'Smith',
    }
)