Skip to content

Commit

Permalink
adding option to specify date range in config file
Browse files Browse the repository at this point in the history
  • Loading branch information
Karolis Rusenas committed Jul 29, 2015
1 parent 54edc4c commit 0e3588e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app_conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ applicationSettings:

# Details for querying google analytics API
# don't forget to add it to your analytics users, profileId - add your google analytics profile ID
# startDaysAgo - specify start date, it can be 7, 20, 30 days ago, this value should be integer
googleAnalyticsApi:
serviceAccount: '__your_service_account@developer.gserviceaccount.com'
profileId: '__your_profile__id'
startDaysAgo: 7

# 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
Expand Down
1 change: 1 addition & 0 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def __init__(self):
try:
settings["service_account_email"] = document["googleAnalyticsApi"]["serviceAccount"]
settings["ga_profile_id"] = document["googleAnalyticsApi"]["profileId"]
settings["start_days_ago"] = int(document["googleAnalyticsApi"]["startDaysAgo"])
except Exception as ex:
print("Check your google service account details: %s" % ex)
sys.exit(1)
Expand Down

0 comments on commit 0e3588e

Please sign in to comment.