https://github.com/aio-libs/aioga
Google Analytics client for asyncio
https://github.com/aio-libs/aioga
aiohttp asyncio google-analytics measurement-protocol
Last synced: 6 months ago
JSON representation
Google Analytics client for asyncio
- Host: GitHub
- URL: https://github.com/aio-libs/aioga
- Owner: aio-libs
- License: mit
- Archived: true
- Created: 2017-05-15T14:14:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-01-22T12:07:49.000Z (almost 4 years ago)
- Last Synced: 2025-06-09T07:08:37.061Z (7 months ago)
- Topics: aiohttp, asyncio, google-analytics, measurement-protocol
- Language: Python
- Homepage: https://pypi.python.org/pypi/aioga
- Size: 23.4 KB
- Stars: 23
- Watchers: 18
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
aioga
=====
:info: Google Analytics client for asyncio
.. image:: https://travis-ci.com/aio-libs/aioga.svg?branch=master
:target: https://travis-ci.com/aio-libs/aioga
:alt: Travis status for master branch
.. image:: https://img.shields.io/pypi/v/aioga.svg
:target: https://pypi.python.org/pypi/aioga
Installation
============
.. code-block:: shell
pip install aioga
Usage
=====
.. code-block:: python
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
``_
Library support all available parametes for measurement protocol
(documentation `here `_)