Skip to content
This repository was archived by the owner on Feb 21, 2024. It is now read-only.

Commit 886119a

Browse files
committed
Fork package
1 parent 5f6d395 commit 886119a

5 files changed

Lines changed: 109 additions & 66 deletions

File tree

DESCRIPTION.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

Pipfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[[source]]
2+
url = "https://pypi.python.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[dev-packages]
7+
pytest = "*"
8+
9+
[packages]
10+
"e1839a8" = {path = ".", editable = true}
11+
12+
[requires]
13+
python_version = "3.6"

Pipfile.lock

Lines changed: 77 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,8 @@
22

33
This library provides a Python interface to Google Analytics, supporting the Universal Analytics Measurement Protocol, with an interface modeled (loosely) after Google's `analytics.js`.
44

5-
**NOTE** this project is reasonably feature-complete for most use-cases, covering all relevant features of the Measurement Protocol, however we still consider it _beta_. Please feel free to file issues for feature requests.
6-
7-
# Contact
8-
Email: `opensource@analyticspros.com`
9-
10-
# Installation
11-
12-
The easiest way to install universal-analytics is directly from PyPi using `pip` by running the following command:
13-
14-
pip install universal-analytics-python
15-
16-
Or use latest code:
17-
18-
pip install -e git+https://github.com/analytics-pros/universal-analytics-python.git#egg=universal-analytics-python-dev
19-
20-
Otherwise you can download source code and install it directly:
21-
22-
python setup.py install
23-
245
# Usage
256

26-
For the most accurate data in your reports, Analytics Pros recommends establishing a distinct ID for each of your users, and integrating that ID on your front-end web tracking, as well as back-end tracking calls. This provides for a consistent, correct representation of user engagement, without skewing overall visit metrics (and others).
27-
287
A simple example:
298

309
```python
@@ -39,15 +18,15 @@ Please see the [test/test_everything.py](./test/test_everything.py) script for a
3918
This library support the following tracking types, with corresponding (optional) arguments:
4019

4120
* pageview: [ page path ]
42-
* event: category, action, [ label [, value ] ]
43-
* social: network, action [, target ]
21+
* event: category, action, [ label [, value ] ]
22+
* social: network, action [, target ]
4423
* timing: category, variable, time [, label ]
4524

4625
Additional tracking types supported with property dictionaries:
4726

4827
* transaction
4928
* item
50-
* screenview
29+
* screenview
5130
* exception
5231

5332
Property dictionaries permit the same naming conventions given in the [analytics.js Field Reference](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference), with the addition of common spelling variations, abbreviations, and hyphenated names (rather than camel-case). These are also demonstrated in the [tests/main.py](./tests/main.py) file.
@@ -58,21 +37,18 @@ Example:
5837

5938
```python
6039
# as python named-arguments
61-
tracker.send('pageview', path = "/test", title = "Test page")
62-
63-
# as property dictionary
40+
tracker.send('pageview', path = "/test", title = "Test page")
41+
42+
# as property dictionary
6443
tracker.send('pageview', {
6544
'path': "/test",
6645
'title': "Test page"
6746
})
6847
```
6948

70-
# Features not implemented
71-
72-
* Throttling
73-
74-
We're particularly interested in the scope of throttling for back-end tracking for users who have a defined use-case for it. Please [contact us](mailto:opensource@analyticspros.com) if you have such a use-case.
49+
# Attribution
7550

51+
This package is a fork of a package by the same name by [Analytics Pros](https://github.com/analytics-pros/universal-analytics-python).
7652

7753
# License
7854

setup.py

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,26 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import print_function
3-
import os
4-
import sys
53

6-
try:
7-
from setuptools import setup
8-
from setuptools.command.install import install
9-
except ImportError:
10-
from distutils.core import setup
11-
from distutils.core.command.install import install
4+
from setuptools import find_packages, setup
125

13-
here = os.path.abspath(os.path.dirname(__file__))
146

15-
VERSION=open('commit-version').read().strip()
16-
print("Preparing version {0}\n".format(VERSION or "NOTFOUND"), file=sys.stderr)
7+
VERSION = '0.2.5'
178

18-
19-
try:
20-
long_description = open('DESCRIPTION.rst', 'rt').read()
21-
except Exception:
22-
long_description = ("Universal Analytics in Python; an implementation of "
23-
"Google's Universal Analytics Measurement Protocol")
9+
long_description = ("Universal Analytics in Python; an implementation of "
10+
"Google's Universal Analytics Measurement Protocol")
2411

2512
setup(
2613
name="universal-analytics-python",
2714
description="Universal Analytics Python Module",
2815
long_description=long_description,
2916
version=VERSION,
30-
author='Sam Briesemeister',
31-
author_email='opensource@analyticspros.com',
32-
url='https://github.com/analytics-pros/universal-analytics-python',
33-
download_url="https://github.com/analytics-pros/universal-analytics-python/tarball/" + VERSION,
17+
author='Lyndsy Simon',
18+
author_email='lyndsy@lyndsysimon.com',
19+
url='https://github.com/lyndsysimon/universal-analytics-python',
3420
license='BSD',
35-
packages=["UniversalAnalytics"],
21+
packages=find_packages('src'),
22+
package_dir={
23+
'': 'src',
24+
},
3625
install_requires=['six'],
37-
zip_safe=True,
3826
)

0 commit comments

Comments
 (0)