Skip to content

[SPIKE] Get Google Analytics data for Company pages#738

Open
weedySeaDragon wants to merge 5 commits intoAgileVentures:developfrom
weedySeaDragon:sprint83-SPIKE-googleAPI-companies#168116590
Open

[SPIKE] Get Google Analytics data for Company pages#738
weedySeaDragon wants to merge 5 commits intoAgileVentures:developfrom
weedySeaDragon:sprint83-SPIKE-googleAPI-companies#168116590

Conversation

@weedySeaDragon
Copy link
Collaborator

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



def self.max_dimension_name_length(rows)
# rubocop:disable UncommunicativeVariableName

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,

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

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

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.

@Luleherll
Copy link
Collaborator

Luleherll commented Jan 6, 2020

Nice work!
More than I expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants