Add paid = cpc on jammers cohots
This commit is contained in:
parent
51838fb413
commit
fad1f9d6d9
|
|
@ -36,10 +36,10 @@ ActiveAdmin.register_page "Jammers Subscription Cohorts" do
|
||||||
filter_ad_set = params[:filter_ad_set]
|
filter_ad_set = params[:filter_ad_set]
|
||||||
filter_ad_name = params[:filter_ad_name]
|
filter_ad_name = params[:filter_ad_name]
|
||||||
|
|
||||||
campaigns = User.where("origin_utm_source ILIKE '%meta%'").distinct.pluck(:origin_utm_campaign).compact.sort
|
campaigns = User.where("origin_utm_medium = 'cpc'").distinct.pluck(:origin_utm_campaign).compact.sort
|
||||||
campaign_ids = User.where("origin_utm_source ILIKE '%meta%'").distinct.pluck(:origin_id).compact.sort
|
campaign_ids = User.where("origin_utm_medium = 'cpc'").distinct.pluck(:origin_id).compact.sort
|
||||||
ad_sets = User.where("origin_utm_source ILIKE '%meta%'").distinct.pluck(:origin_term).compact.sort
|
ad_sets = User.where("origin_utm_medium = 'cpc'").distinct.pluck(:origin_term).compact.sort
|
||||||
ad_names = User.where("origin_utm_source ILIKE '%meta%'").distinct.pluck(:origin_content).compact.sort
|
ad_names = User.where("origin_utm_medium = 'cpc'").distinct.pluck(:origin_content).compact.sort
|
||||||
|
|
||||||
div style: "margin-bottom: 20px; padding: 10px; background-color: #f4f4f4; border-radius: 4px;" do
|
div style: "margin-bottom: 20px; padding: 10px; background-color: #f4f4f4; border-radius: 4px;" do
|
||||||
form action: admin_jammers_subscription_cohorts_path, method: :get do
|
form action: admin_jammers_subscription_cohorts_path, method: :get do
|
||||||
|
|
@ -49,7 +49,7 @@ ActiveAdmin.register_page "Jammers Subscription Cohorts" do
|
||||||
option "Organic", value: 'Organic', selected: filter_type == 'Organic'
|
option "Organic", value: 'Organic', selected: filter_type == 'Organic'
|
||||||
option "Advertising", value: 'Advertising', selected: filter_type == 'Advertising'
|
option "Advertising", value: 'Advertising', selected: filter_type == 'Advertising'
|
||||||
end
|
end
|
||||||
|
|
||||||
if filter_type == 'Advertising'
|
if filter_type == 'Advertising'
|
||||||
div style: "margin-top: 10px;" do
|
div style: "margin-top: 10px;" do
|
||||||
span "Campaign Name: ", style: "font-weight: bold; margin-right: 5px;"
|
span "Campaign Name: ", style: "font-weight: bold; margin-right: 5px;"
|
||||||
|
|
@ -60,7 +60,9 @@ ActiveAdmin.register_page "Jammers Subscription Cohorts" do
|
||||||
option c, value: c, selected: filter_campaign == c
|
option c, value: c, selected: filter_campaign == c
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
div style: "margin-top: 10px;" do
|
||||||
span "Campaign ID: ", style: "font-weight: bold; margin-right: 5px;"
|
span "Campaign ID: ", style: "font-weight: bold; margin-right: 5px;"
|
||||||
select name: 'filter_campaign_id', onchange: 'this.form.submit()', style: "margin-right: 15px;" do
|
select name: 'filter_campaign_id', onchange: 'this.form.submit()', style: "margin-right: 15px;" do
|
||||||
option "All", value: ''
|
option "All", value: ''
|
||||||
|
|
@ -81,6 +83,7 @@ ActiveAdmin.register_page "Jammers Subscription Cohorts" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
div style: "margin-top: 10px;" do
|
||||||
span "Ad Name: ", style: "font-weight: bold; margin-right: 5px;"
|
span "Ad Name: ", style: "font-weight: bold; margin-right: 5px;"
|
||||||
select name: 'filter_ad_name', onchange: 'this.form.submit()', style: "margin-right: 15px;" do
|
select name: 'filter_ad_name', onchange: 'this.form.submit()', style: "margin-right: 15px;" do
|
||||||
option "All", value: ''
|
option "All", value: ''
|
||||||
|
|
@ -89,7 +92,8 @@ ActiveAdmin.register_page "Jammers Subscription Cohorts" do
|
||||||
option c, value: c, selected: filter_ad_name == c
|
option c, value: c, selected: filter_ad_name == c
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
noscript { input type: :submit, value: "Filter" }
|
noscript { input type: :submit, value: "Filter" }
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@ ActiveAdmin.register JamRuby::User, :as => 'UserSource' do
|
||||||
config.filters = false
|
config.filters = false
|
||||||
config.per_page = 250
|
config.per_page = 250
|
||||||
|
|
||||||
scope("Standard", default: true) { |scope| scope.unscoped.where("origin_utm_source != 'organic' OR origin_utm_source IS NULL").order('created_at desc') }
|
scope("Paid", default: true) { |scope| scope.unscoped.where(:origin_utm_medium => 'cpc').order('created_at desc') }
|
||||||
|
scope("Inorganic Source") { |scope| scope.unscoped.where("origin_utm_source != 'organic' OR origin_utm_source IS NULL").order('created_at desc') }
|
||||||
scope("Include Organic") { |scope| scope.unscoped.order('created_at desc') }
|
scope("Include Organic") { |scope| scope.unscoped.order('created_at desc') }
|
||||||
|
|
||||||
index do
|
index do
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@ if defined?(Bundler)
|
||||||
config.google_public_server_key = "AIzaSyCPTPq5PEcl4XWcm7NZ2IGClZlbsiE8JNo"
|
config.google_public_server_key = "AIzaSyCPTPq5PEcl4XWcm7NZ2IGClZlbsiE8JNo"
|
||||||
|
|
||||||
# Facebook Conversions API
|
# Facebook Conversions API
|
||||||
config.facebook_ad_source = Set.new(['facebook', 'instagram', 'meta', 'meta_ads', 'fb', 'ig'])
|
config.facebook_ad_source = Set.new(['facebook', 'instagram', 'meta', 'meta_ads', 'fb', 'ig', 'th', 'threads'])
|
||||||
config.facebook_pixel_id = "25663975269956141" # ONLY ONE. NO MULTI ENV
|
config.facebook_pixel_id = "25663975269956141" # ONLY ONE. NO MULTI ENV
|
||||||
config.facebook_access_token = "EABAGQTtcGk4BQewKCztlfImT86ZAPsRAm3KDrYWsOFZAdLtJCa7bVOzdnZCnHZBFZBRMFVoSZCQdIpX01xXDM0ZCFmYrkPuAHdLsNBU61c7MZCZBLCFd3Q0qrxiJkeYr3F8FH3p98d0tGKljplhJ8vWBIKAiBXaUCCYk6urZB5qZAIEPsppWZCHOep91xZCtMVqtbGJQfFAZDZD" # ONLY ONE. NO MULTI ENV
|
config.facebook_access_token = "EABAGQTtcGk4BQewKCztlfImT86ZAPsRAm3KDrYWsOFZAdLtJCa7bVOzdnZCnHZBFZBRMFVoSZCQdIpX01xXDM0ZCFmYrkPuAHdLsNBU61c7MZCZBLCFd3Q0qrxiJkeYr3F8FH3p98d0tGKljplhJ8vWBIKAiBXaUCCYk6urZB5qZAIEPsppWZCHOep91xZCtMVqtbGJQfFAZDZD" # ONLY ONE. NO MULTI ENV
|
||||||
config.facebook_conversion_api_tls = true
|
config.facebook_conversion_api_tls = true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue