Skip to main content

Analytics SDK

Project description

GitHub license python badge

SDK Oficial para Python

Está SDK é utilizada para enviar eventos à API de Analytics da Atados

Instalando

pip install @atados/analytics-sdk

Antes de começar, entenda a função track

track(
  /**
   * Tipo: String
   * Use para categorizar esta acao
   * Ex.:
   *   category = 'Apply',
   *   category = 'Notification',
   */
  category: string,
  /**
   * Tipo: String
   * Use para identificar esta ação dentro da categoria
   * Ex.:
   *   label = 'Cancel Apply',
   *   label = 'View Notification',
   */
  label: string,
  /**
   * Use para enriquecer esta ação dentro da categoria
   * Ex.:
   *   action = ID de inscricao
   *   action = { notificationId, notificationKind }
   */
  action: any,
  /**
   * Use este argumento para sobrepor as configurações de userId
   * ou meta
   */
  user_id?: number,
  /**
   * Use este argumento para sobrepor as configurações de meta
   */
  override_meta?: {}
): Promise<void>

Iniciando

from Analytics from analytics

def report_error(error):
  print(error.message)

analytics = Analytics(
  api_url=API_URL,
  api_token=API_TOKEN,
  meta=mock_meta,
  on_error=report_error,
  meta={ 'channelId': 1 }
)
track_result = analytics.track(
  category='Category',
  label='Label',
  action={ 'data': 1 },
  # (Opcional)
  user_id=1,
  # (Opcional)
  sessoin_id=1
)

Utilizando

analytics.track('Category', 'Label', 'Action')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

atados-analytics-sdk-0.0.4b1.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

atados_analytics_sdk-0.0.4b1-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page