Fix query instruction for GoogleAnalytics events (#812)

* Add tracking for home page featured impressions/clicks

* Change impression event to view in Google Analytics

* Fix typo in GoogleAnalytics object

* Fix query instruction for GoogleAnalytics events
This commit is contained in:
Ben Halpern 2018-10-04 10:46:45 -04:00 committed by GitHub
parent 8a16979a43
commit 4d02005108
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,7 +24,7 @@ class GoogleAnalytics
def get_feed_impression_info
requests = @article_ids.map do |id|
make_report_request("ga:eventAction=~^featured-feed-impression,ga:eventLabel=~^articles-#{id}",
make_report_request("ga:eventAction=~featured-feed-impression,ga:eventLabel==articles-#{id}",
"ga:totalEvents")
end
results = fetch_all_results(requests)
@ -33,7 +33,7 @@ class GoogleAnalytics
def get_feed_click_info
requests = @article_ids.map do |id|
make_report_request("ga:eventAction=~^featured-feed-click,ga:eventLabel=~^articles-#{id}",
make_report_request("ga:eventAction=~featured-feed-click,ga:eventLabel==articles-#{id}",
"ga:totalEvents")
end
results = fetch_all_results(requests)