Every campaign has an end.
Drop ahoy, because it's more trouble than it's worth. This means dropping visits, campaigns, targets. Campaigns are better run to analytics, such as: * https://matomo.org/docs/tracking-campaigns/ * https://matomo.org/docs/tracking-goals-web-analytics/ * https://support.google.com/analytics/answer/1012040?hl=en
This commit is contained in:
parent
62056fc044
commit
b11001cdba
47 changed files with 19 additions and 1420 deletions
|
|
@ -1,24 +0,0 @@
|
|||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1
|
||||
- if @campaign.new_record?
|
||||
New
|
||||
Campaign
|
||||
= @campaign.name
|
||||
|
||||
.row
|
||||
.col-md-8
|
||||
= semantic_form_for(@campaign, url: (@campaign.new_record? ? admin_conference_campaigns_path : admin_conference_campaign_path(@conference.short_title, @campaign))) do |f|
|
||||
= f.inputs do
|
||||
= f.input :name, input_html: { autofocus: true }
|
||||
= f.inputs name: 'UTM Parameters' do
|
||||
= f.input :utm_campaign, label: 'Campaign', hint: 'Groups all of the content from one campaign. E.g. 20percentpromocode'
|
||||
= f.input :utm_source, label: 'Source', hint: 'Which website is sending you traffic. E.g. Facebook, google+, blog'
|
||||
= f.input :utm_medium, label: 'Medium', hint: 'The type of marketing medium that the link is featured in. E.g. Facebook wallpost or facebook advertisement'
|
||||
= f.input :utm_term, label: 'Term', hint: 'Campaign keywords. E.g. marketing+conference+opensource'
|
||||
= f.input :utm_content, label: 'Content', hint: 'Used to track the different types of content that point to the same URL (A/B Test).'
|
||||
= f.inputs name: 'Targets' do
|
||||
= f.input :targets, collection: @conference.targets
|
||||
%p.text-right
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1 Campaigns
|
||||
%p.text-muted
|
||||
Track where people come from
|
||||
.row
|
||||
.col-md-12
|
||||
%table.table.table-hover#campaigns
|
||||
%thead
|
||||
%tr
|
||||
%th Name
|
||||
%th Visits
|
||||
%th Registrations
|
||||
%th Submissions
|
||||
%th Link
|
||||
%th Actions
|
||||
%tbody
|
||||
- @campaigns.each do |campaign|
|
||||
%tr
|
||||
%td{ 'id' => "name_#{campaign.id}" }
|
||||
= campaign.name
|
||||
%td{ 'id' => "visits_#{campaign.id}" }
|
||||
= campaign.visits_count
|
||||
%td{ 'id' => "registrations_#{campaign.id}" }
|
||||
= campaign.registrations_count
|
||||
%td{ 'id' => "submissions_#{campaign.id}" }
|
||||
= campaign.submissions_count
|
||||
%td
|
||||
%a.copyLink{ 'href' => '#', 'data-url' => root_path + campaign.url_parameters }
|
||||
Copy link
|
||||
%td
|
||||
.btn-group
|
||||
= link_to 'Edit',
|
||||
edit_admin_conference_campaign_path(@conference.short_title, campaign.id),
|
||||
class: 'btn btn-primary'
|
||||
= link_to 'Delete',
|
||||
admin_conference_campaign_path(@conference.short_title, campaign.id),
|
||||
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the campaign #{campaign.name}?" }
|
||||
.row
|
||||
.col-md-12
|
||||
= link_to 'New Campaign', new_admin_conference_campaign_path, class: 'btn btn-success pull-right'
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
- if campaigns && !campaigns.empty?
|
||||
.row
|
||||
.col-md-12
|
||||
%p
|
||||
Your target "#{campaigns.values[0]['target_name']}" from campaign "#{campaigns.values[0]['campaign_name']}" has generated
|
||||
%strong
|
||||
#{pluralize(campaigns.values[0]['value'], campaigns.values[0]['unit'])}
|
||||
since #{campaigns.values[0]['created_at']}.
|
||||
%p
|
||||
That is
|
||||
%strong{ 'style' => "color: #{target_progress_color(campaigns.values[0]['progress'])};" }
|
||||
#{campaigns.values[0]['progress']} %
|
||||
of your target, there are
|
||||
%strong{ 'style' => "color: #{days_left_color(campaigns.values[0]['days_left'])};" }
|
||||
#{pluralize(campaigns.values[0]['days_left'], 'day')} left.
|
||||
.row
|
||||
.col-md-12
|
||||
%div{ 'style' => 'display: none;', 'id' => "#{name}" }
|
||||
- campaigns.drop(1).each do |(_key, value)|
|
||||
%div
|
||||
%p
|
||||
Your target "#{value['target_name']}" from campaign "#{value['campaign_name']}" has generated
|
||||
%strong
|
||||
#{pluralize(value['value'], value['unit'])}
|
||||
since #{value['created_at']}.
|
||||
%p
|
||||
That is
|
||||
%strong{ 'style' => "color: #{target_progress_color(value['progress'])};" }
|
||||
#{value['progress']} %
|
||||
of your target, there are
|
||||
%strong{ 'style' => "color: #{days_left_color(value['days_left'])};" }
|
||||
#{pluralize(value['days_left'], 'day')} left.
|
||||
.row
|
||||
.col-md-12
|
||||
- if campaigns.length > 1
|
||||
%a.show_targets{ 'href' => '#', 'data-name' => "#{name}" }
|
||||
more
|
||||
- else
|
||||
%h5.text-warning.text-center
|
||||
No Campaigns!
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
- if targets && !targets.empty?
|
||||
.row
|
||||
.col-md-8.col-md-offset-2
|
||||
.row
|
||||
.col-md-10
|
||||
%h6.text-muted.pull-left
|
||||
Target 1
|
||||
.row
|
||||
.col-md-10
|
||||
.progress{ 'title' => "#{targets.keys[0]}" }
|
||||
.progress-bar{ 'role' => 'progressbar', 'aria-valuenow' => " #{targets.values[0]}", 'aria-valuemin' => '0',
|
||||
'aria-valuemax' => '100', 'style' => "width: #{targets.values[0]}%;" }
|
||||
= "#{targets.values[0]} %"
|
||||
.row
|
||||
.col-md-8.col-md-offset-2
|
||||
%div{ 'style' => 'display: none;', 'id' => "#{name}" }
|
||||
- targets.drop(1).each_with_index do |(key, value), index|
|
||||
.row
|
||||
.col-md-10
|
||||
%h6.text-muted.pull-left
|
||||
= "Target #{index + 2}"
|
||||
.row
|
||||
.col-md-10
|
||||
.progress{ 'title' => "#{key}" }
|
||||
.progress-bar{ 'role' => 'progressbar', 'aria-valuenow' => "#{value}", 'aria-valuemin' => '0',
|
||||
'aria-valuemax' => '100', 'style' => "width: #{value}%;" }
|
||||
= "#{value} %"
|
||||
.row
|
||||
.col-md-2.col-md-offset-2
|
||||
- if targets.length > 1
|
||||
%a.show_targets{ 'href' => '#', 'data-name' => "#{name}" }
|
||||
more
|
||||
|
|
@ -115,13 +115,6 @@
|
|||
= render partial: 'recent_submissions', locals: {recent_events: @recent_events}
|
||||
.col-md-4
|
||||
= render partial: 'top_submitter', locals: {top_submitter: @top_submitter}
|
||||
.row
|
||||
.col-md-12
|
||||
%h3
|
||||
%span
|
||||
%i.fa.fa-flag
|
||||
Campaigns
|
||||
= render partial: 'campaigns', locals: {campaigns: @campaigns, name: 'campaigns'}
|
||||
|
||||
:javascript
|
||||
$('#recentTable a').click(function (e) {
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1
|
||||
-if @target.new_record?
|
||||
New
|
||||
Target
|
||||
.row
|
||||
.col-md-8
|
||||
= semantic_form_for(@target, url: (@target.new_record? ? admin_conference_targets_path : admin_conference_target_path(@conference.short_title, @target))) do |f|
|
||||
= f.input :due_date, as: :string, input_html: { class: 'target-due-date-datepicker'}, label: 'Until when do you want to have '
|
||||
= f.input :target_count, input_html: { autofocus: true }, label: 'this amount of '
|
||||
= f.input :unit, as: :select, label: 'Unit', class: 'form-control', collection: Target.units.values, include_blank: false
|
||||
%p.text-right
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1 Targets
|
||||
%p.text-muted
|
||||
Set up goals for your conference
|
||||
.row
|
||||
.col-md-12
|
||||
%table.table.table-hover#targets
|
||||
%thead
|
||||
%tr
|
||||
%th Due Date
|
||||
%th Target Count
|
||||
%th Unit
|
||||
%th Actions
|
||||
%tbody
|
||||
- @targets.each do |target|
|
||||
%tr
|
||||
%td{'id'=> "due_date_#{target.id}"}
|
||||
= target.due_date
|
||||
%td{'id'=> "count#{target.id}"}
|
||||
= target.target_count
|
||||
%td{'id'=> "unit_#{target.id}"}
|
||||
= target.unit
|
||||
%td
|
||||
.btn-group
|
||||
= link_to 'Edit',
|
||||
edit_admin_conference_target_path(@conference.short_title, target.id),
|
||||
class: 'btn btn-primary'
|
||||
= link_to 'Delete',
|
||||
admin_conference_target_path(@conference.short_title, target.id),
|
||||
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete this target?" }
|
||||
.row
|
||||
.col-md-12
|
||||
= link_to 'New Target', new_admin_conference_target_path, class: 'btn btn-success pull-right'
|
||||
|
|
@ -74,10 +74,6 @@
|
|||
= link_to (current_or_last_object_state('Event', event_id).try(:title) || 'deleted event'),
|
||||
admin_conference_program_event_path(conference_short_title, event_id)
|
||||
|
||||
- when 'Target'
|
||||
target
|
||||
= link_if_alive version, object.to_s, admin_conference_targets_path(conference_short_title), conference
|
||||
|
||||
- when 'EventSchedule'
|
||||
event
|
||||
= link_to (current_or_last_object_state('Event', object.event_id).try(:title) || 'deleted'),
|
||||
|
|
@ -187,12 +183,6 @@
|
|||
admin_conference_ticket_path(conference_short_title, version.item_id),
|
||||
conference
|
||||
|
||||
- when 'Campaign'
|
||||
campaign
|
||||
= link_if_alive version, object.name,
|
||||
admin_conference_campaigns_path(conference_short_title),
|
||||
conference
|
||||
|
||||
- when 'DifficultyLevel'
|
||||
difficulty level
|
||||
= link_if_alive version, object.title,admin_conference_program_difficulty_levels_path(conference_short_title), conference
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue