Skip to content

Instantly share code, notes, and snippets.

@GeorgeVince
Last active August 15, 2022 13:16
Show Gist options
  • Save GeorgeVince/2df96165f2d87d83d57d820eb716d70f to your computer and use it in GitHub Desktop.
Save GeorgeVince/2df96165f2d87d83d57d820eb716d70f to your computer and use it in GitHub Desktop.
rudder-python-sdk-test
import os
import rudder_analytics
from dotenv import load_dotenv
load_dotenv()
rudder_analytics.write_key = os.getenv("RUDDER_WRITE_KEY")
rudder_analytics.data_plane_url = os.getenv("RUDDER_DATA_PLANE")
rudder_analytics.track('gv-dev', 'Simple Track Event', {
'key1': 'val1'
})
rudder_analytics.track('gv-dev', 'event_details_simple', {
'key1': 'val1'
})
rudder_analytics.track('gv-dev', 'Article Read', {
'title': 'The Independence',
'subtitle': 'Story of the Weak',
'author': 'John Doe'
})
rudder_analytics.screen('userid', 'Settings', 'Brightness', {
'from': 'Settings Screen'
})
rudder_analytics.identify('123456', {
'email': 'name@surname.com',
'name': 'John Doe',
'friends': 16
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment