Skip to content
This repository has been archived by the owner on Feb 3, 2025. It is now read-only.

Commit

Permalink
exclude paid and organic report for zero impressions
Browse files Browse the repository at this point in the history
  • Loading branch information
pingles committed Jan 27, 2015
1 parent b0c1d1e commit 889983d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ pom.xml.asc
/.lein-*
/.nrepl-port
ads.properties
*.csv


6 changes: 4 additions & 2 deletions src/adworj/reporting.clj
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@
(Selector. ))

(defn zero-impressionable? [^ReportDefinitionReportType report-type]
(cond (= ReportDefinitionReportType/SEARCH_QUERY_PERFORMANCE_REPORT report-type) false
:default true))
(condp = report-type
ReportDefinitionReportType/SEARCH_QUERY_PERFORMANCE_REPORT false
ReportDefinitionReportType/PAID_ORGANIC_QUERY_REPORT false
true))

(defn report-definition [report name & {:keys [range selected-fields]
:or {range (date-range :yesterday)}}]
Expand Down

0 comments on commit 889983d

Please sign in to comment.