diff --git a/.gitignore b/.gitignore index efb6df3..208352c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ # Vagrant .vagrant + +app_conf.yaml \ No newline at end of file diff --git a/README.rst b/README.rst index 5e882f1..7303aff 100644 --- a/README.rst +++ b/README.rst @@ -22,20 +22,19 @@ https://developers.google.com/analytics/devguides/reporting/mcf/v3/limits-quotas Set Per-user limit to more than 1. -Provide service account and profile_id in settings.py +**Rename app_conf.yaml.example to app_conf.yaml** +Then, use this file for configuration: -# Authentication via Google +* applicationSettings - these options are used for callbacks as well as server startup. For local development + leave them as is. -provide details for secure authentication in settings.py: -* google_oauth settings value should contain key with your Client ID (create a new client ID application) and secret with Client secret -* allowed_domain settings value should contain whitelisted domain, leave it blank to allow all domains. +* googleAnalyticsApi - in your google developer console go to APIs & auth > credentials and create new service account. + Your profileId is your google analytics profile ID. -# Details to query google API +* googleOAuth - key value should contain key with your Client ID (Client ID for native application) and secret - Client secret +* allowedDomain value should contain whitelisted domain, leave it blank ('') to allow all domains. -* SERVICE_ACCOUNT settings value should contain email address of your service account that you created and gave rights - to access your analytics. -* PROFILE_ID settings value contain your analytics profile ID to reduce query count. Start the server ================ diff --git a/app_conf.yaml.example b/app_conf.yaml.example new file mode 100644 index 0000000..646537b --- /dev/null +++ b/app_conf.yaml.example @@ -0,0 +1,19 @@ +applicationSettings: + debug: true + hostname: "localhost" + port: 8888 + forksPerCPU: 0 + +# Details for querying google analytics API +# don't forget to add it to your analytics users, profileId - add your google analytics profile ID +googleAnalyticsApi: + serviceAccount: '__your_service_account@developer.gserviceaccount.com' + profileId: '__your_profile__id' + +# application credentials from APIs & auth > credentials > Client ID for native application +# key represents "Client ID", secret is "Client secret". Oauth module expects to find "google_oauth" in app settings +# set allowedDomain to '' if you want to allow all domains +googleOAuth: + key: '__your_client_key__' + secret: '__your_client_secret__' + allowedDomain: '__your_domain__' \ No newline at end of file