================
Django app used to pull daily Google Analytics data into your django database. It provides abstract models which you should
inherit from in your app.
To Use
------
Add the app to your settings.py file:
INSTALLED_APPS = [...
'ga_puller',
...]
In your app,
Create models that inherit from the abstract classes provided. Here is a sample of a basic implementation:
from ga_puller.models import AnalyticsPage, DailyEventTrackingBase, DailyPageTrackingBase
class Page(AnalyticsPage):
def __unicode__(self):
return "%s" % self.page_path
class DailyEventData(DailyEventTrackingBase):
page = models.ForeignKey('Page')
@classmethod
def get_page_class(cls):
return Page
class DailyPageTrackingData(DailyPageTrackingBase):
page = models.ForeignKey('Page')
@classmethod
def get_page_class(cls):
return Page
Add a list named analytics_import_models defining the data models to the __init__.py of your app module:
from models import DailyPageTrackingData, DailyEventData
analytics_import_models = [DailyPageTrackingData, DailyEventData]
Create a 'private' python package at the root level of your django project (at the same level as the manage.py file).
The application requires a service account for authentication with Google. These can be configured by logging into your account at https://cloud.google.com.
Copy your Google API private key file to the private directory (name it privatekey.pem).
Create a python file named 'accounts.py' in the private directory with the following code (update with your account data):
service_account = 'xxxxxx@developer.gserviceaccount.com'
view_ids = {'app_name': '#########', ...}
This package uses [Google APIs Client Library for Python](https://developers.google.com/api-client-library/python/) which should automatically be installed through setup.
Release Notes:
0.1.0: Initial Release
0.1.1: Updated to support importing from separate views in google analytics.
0.1.2: Increased the size of the label and page_path fields.
Metadata
Release files for django-ga-puller 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-ga-puller-0.1.4.tar.gz | 5.3 kB | Without provenance | Details |
Release files / django-ga-puller-0.1.4.tar.gz
| Download URL | django-ga-puller-0.1.4.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca1246513b71d11f1138206ce0ab8425e7ba4f7ee31c971bb8203ddf6d869bda
|
|
BLAKE2b-256 checksum How to use checksums |
c5c802e250eca254c9539cf5a02c189feec072ecf348acd64c3d1ef51fd825a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-ga-puller 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.