-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add agency name to report #198
Conversation
@@ -1,3 +1,4 @@ | |||
# Agency for International Development | |||
export ANALYTICS_REPORT_IDS="ga:68380943" | |||
export AGENCY_NAME=agency-international-development | |||
export AWS_BUCKET_PATH=data/agency-international-development |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't the analytics
script itself read the AGENCY_NAME
env var, instead of having it passed in on a new command line flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just moved things around so the name is pulled from the AGENCY_NAME
env var.
index.js
Outdated
@@ -64,6 +64,8 @@ var run = function(options) { | |||
|
|||
if (options.debug) console.log("[" + report.name + "] Saving report data..."); | |||
|
|||
if (options.agency) data.agnecy = options.agency; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking a typo here
8351668
to
56219c6
Compare
bc5fc9f
to
b9c8f9a
Compare
README.md
Outdated
@@ -232,6 +232,12 @@ analytics --frequency=realtime | |||
analytics --publish --debug | |||
``` | |||
|
|||
* `--agency` - provide an agency name to associate with the report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the documentation also need to be updated to not use the --agency
flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, my bad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amended the commit
b9c8f9a
to
88607c2
Compare
This command adds an option for specifying an agency in the CLI options. This allows the name of the agency the data is being pulled for to be included in the final report, and in the data that is written to the database.
Ref #194
Hold for #197