Skip to main content

Google Analytics client for asyncio

Project description

aioga

info:

Google Analytics client for asyncio

https://img.shields.io/travis/wikibusiness/aioga.svg https://img.shields.io/pypi/v/aioga.svg

Installation

pip install aioga

Usage

import asyncio
import uuid

from aioga import GA

TRACKING_ID = 'XX-XXXXXXXX-X'


async def go():
    cid = uuid.uuid4()

    async with GA(TRACKING_ID) as ga:
        ga.event(str(cid), ec='tests', ea='success from context manager')
        # all methods returns asynio.Tasks, which can be awaited if needed


loop = asyncio.get_event_loop()
loop.run_until_complete(go())
loop.close()

Documentation

The library is asynchronous client for measurement protocol. All available hit types are supported.

Full documentation of measurement protocol provides by google

Available methods

  • pageview

  • screenview

  • event

  • transaction

  • item

  • social

  • exception

  • timing

Available parameters

All methods require cid (Client ID). The value of this field should be a random UUID (version 4) as described in http://www.ietf.org/rfc/rfc4122.txt

Library support all available parametes for measurement protocol (documentation here)

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

aioga-0.0.1.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file aioga-0.0.1.tar.gz.

File metadata

  • Download URL: aioga-0.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for aioga-0.0.1.tar.gz
Algorithm Hash digest
SHA256 16ca159fbf48b34de8fef72175dbbf5e68414d0ea8e121df2aa85aac5dce9245
MD5 54c87e19bec67af34abaf8ba5662a97e
BLAKE2b-256 f188d330954d7f9df1ef12364a896d14cf6ea8dd25901ded62117240636d7065

See more details on using hashes here.

Provenance

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