-
Notifications
You must be signed in to change notification settings - Fork 37
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
[SPIKE] Get Google Analytics data for Company pages #738
base: develop
Are you sure you want to change the base?
[SPIKE] Get Google Analytics data for Company pages #738
Conversation
|
||
|
||
def self.max_dimension_name_length(rows) | ||
# rubocop:disable UncommunicativeVariableName |
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.
Lint/UnneededCopDisableDirective: Unnecessary disabling of UncommunicativeVariableName (unknown cop).
date_ranges: [date_range_days_ago(30)]) | ||
|
||
report_info = { view_id: ENV['SHF_GOOGLE_ANALYTICS_VIEW_ID'], | ||
date_ranges: date_ranges, |
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.
Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.
|
||
# get the size of the widest string in the column | ||
def self.col_max_size(array, column_index) | ||
array.map { |row| row[column_index] ? row[column_index].to_s.size : 0 }.max # rubocop:disable DuplicateMethodCall |
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.
Lint/UnneededCopDisableDirective: Unnecessary disabling of DuplicateMethodCall (unknown cop).
# column_separator<String>:: String to use at the end of each column. Default = " " (2 spaces) | ||
# | ||
# @return [String] - a String with the formatted table | ||
def self.print_table(array, options = {}) # rubocop:disable MethodLength |
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.
Lint/UnneededCopDisableDirective: Unnecessary disabling of Metrics/MethodLength.
Nice work! |
PT Story: get data from Google Analytics
PT URL: https://www.pivotaltracker.com/story/show/168116590
This is a spike/exploration of getting data from GoogleAnalytics for company pages.
I put theses classes under
.../services
just because (1) they're still in exploratory stage, and (2) I didn't spend any time thinking about where else they could/should go. (Probably the 'array of arrrays formatter' should be put into /lib)I just wanted to get the code working and up here so we could look at it..
Filter for getting the company pages:
dim_filter_company_pages
Ready for review:
@Luleherll