From ed82d7cb5557a8a4cd853c5af712246998e77e13 Mon Sep 17 00:00:00 2001 From: Chris Salvato Date: Wed, 25 May 2016 18:43:52 -0400 Subject: [PATCH] Modify summarize_bing_elog to account for differences between bing and adwords data. --- BingUtilities/NAMESPACE | 1 + BingUtilities/R/summarize_bing_elog.r | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BingUtilities/NAMESPACE b/BingUtilities/NAMESPACE index 2feed83..647960f 100644 --- a/BingUtilities/NAMESPACE +++ b/BingUtilities/NAMESPACE @@ -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) diff --git a/BingUtilities/R/summarize_bing_elog.r b/BingUtilities/R/summarize_bing_elog.r index fa3b2ed..c7f79fa 100644 --- a/BingUtilities/R/summarize_bing_elog.r +++ b/BingUtilities/R/summarize_bing_elog.r @@ -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),