Skip to content

Commit

Permalink
Modify summarize_bing_elog to account for differences between bing an…
Browse files Browse the repository at this point in the history
…d adwords data.
  • Loading branch information
csalvato committed May 25, 2016
1 parent d6099a6 commit ed82d7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions BingUtilities/NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export(as.keyword)
export(clean_raw_keyword_data)
export(keyword_performance_data)
export(raw_keyword_performance_data)
export(summarize_bing_elog)
7 changes: 3 additions & 4 deletions BingUtilities/R/summarize_bing_elog.r
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ summarize_bing_elog <- function(elog_data_frame,
return (summarize(elog_data_frame, cost = sum(cost, na.rm = TRUE),
average_position = weighted.mean(average_position,impressions, na.rm=TRUE),
average_quality_score=mean(quality_score, na.rm=TRUE),
estimated_available_impressions = sum(impressions/est_search_impression_share, na.rm=TRUE),
impressions = sum(impressions, na.rm = TRUE),
# imp share is not wholly accurate because of the way the numbers are reported, but close enough.
# May result in 100%+ when impressions are very low
est_search_impression_share = impressions/estimated_available_impressions,
#### Can't get impression share info from Bing (at least not in a way that CVS understands...?)
#estimated_available_impressions = sum(impressions/est_search_impression_share, na.rm=TRUE),
#est_search_impression_share = impressions/estimated_available_impressions,
clicks = sum(clicks, na.rm = TRUE),
click_through_rate = clicks/impressions,
num_acquisitions = n_distinct(user_id, na.rm = TRUE),
Expand Down

0 comments on commit ed82d7c

Please sign in to comment.