Skip to content
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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

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