Analytics SDK
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for atados-analytics-sdk-0.0.2b1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a411b46fc9b72e045a3e1713e1b80878fb5ba6784cfd06f4fc03dfca415cd562 |
|
MD5 | db584f67a2e681c69e55f7287723b4a0 |
|
BLAKE2b-256 | 1ce3f5263eb205916d1519e67b456365643f280fc8f29b80310b71408e41a98b |
Close
Hashes for atados_analytics_sdk-0.0.2b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f306861756091869f3ac6fc18b95aa0d27106f1244f4de38d869f8236ec4a76d |
|
MD5 | 9fb1592f15a69d589198ac7112cb6cb1 |
|
BLAKE2b-256 | f4642bf276e7219ea8d665303e621c63a5ab89bedf4c44980dabec804992b5a5 |