caboose-cms 0.6.20 → 0.6.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- M2E4ZjUxYTEyYzFjN2Q1ZTBlNmQ2Y2MwOGMyZjMyNmI4NDlkMjk4OQ==
4
+ YzdkNGFjZTA5YTcyYTEyZTAxNzhjNTk5OGZlNDNlMDFiMGFkODFjYQ==
5
5
  data.tar.gz: !binary |-
6
- YmU0N2FkNDZiMjYyNjIxYjIyY2UxNjVmY2QzZTliOWZjYTAxMGQ0ZQ==
6
+ OWQwZWYxYjQ0MDI5ZjEyY2EzZTRhNTNjOWI0OWYyNTkwYWFmMmU3Nw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZjJmOGZjNzRkNzI2MmFhYjcyM2VlZGU4OTc4YWE0M2U3NjhjMmM5ZTVlMDg4
10
- YzYyZTQxZGYxY2JiYmM0MjQyNmRkYThhOTcxMDFlNWFiYTllZjRmMTJhMTZh
11
- YWNiOWVjZjFiMGZhZGE0MmI0ZTVlNWE3YzU2ZmQ4ZjQ3MDUzNTY=
9
+ NDk3N2FkNWI5ZGEyYjM0ZDI1ZDczOWYzZWMzNDQyOTcyM2FiMTVlOGZmZmE4
10
+ MGQxMmI1ZDliOTE3NzM2YmY4OGIxYjJhYWZmMmZkMDVhZWQ5OGZiMTA5ZmYz
11
+ YzgwNGJjZjliOWEzMmUxNWVjOWJhOTVlZDVkNDEzNTY5ZjlmZmY=
12
12
  data.tar.gz: !binary |-
13
- M2NjZjBmZDdiOTU2MDE4M2M0NjYxOWY2YmMwMWMzY2ExNTIzOTRlYzVlMDE4
14
- MzRhMWRjN2FiZTVjNDQzY2Y2NTIxOGJmMTk5MmE1YjExM2Y2YWVmMjlkZjhj
15
- YTEyOTExOTY5ZTE3YzAwZTdjMzBhZTk3ZWQzZjhhZDZkNzM3ZjU=
13
+ OGY2MjcxZDk1YjJjNDcyMWQzYzMzMzZiMzEzNjM3MDZkMzRkYWJkNjBhNzBj
14
+ ODQwMjNmMzZiY2Y2NTY2MTJkOTlkYzhhNzJhMjQ1ZTg2NTY2Yzk1MDI0YTUw
15
+ MGNlMTlkMTMyMzY0MDU1MjdhZGU2MWNiMzUxNTc4ZGQ3ODczNjA=
@@ -57,7 +57,7 @@ module Caboose
57
57
  #Caboose.log(@rates.inspect)
58
58
  @logged_in_user = logged_in_user
59
59
 
60
- add_ga_event('checkout', 'shipping')
60
+ add_ga_event('Ecommerce', 'Checkout', 'Shipping')
61
61
  end
62
62
 
63
63
  # Step 4 - Gift cards
@@ -66,8 +66,8 @@ module Caboose
66
66
  redirect_to '/checkout' and return if !logged_in?
67
67
  redirect_to '/checkout/addresses' and return if @order.billing_address.nil? || (@order.has_shippable_items? && @order.shipping_address.nil?)
68
68
  redirect_to '/checkout/shipping' and return if @order.has_shippable_items? && @order.has_empty_shipping_methods?
69
- @logged_in_user = logged_in_user
70
- add_ga_event('checkout', 'gift-cards')
69
+ @logged_in_user = logged_in_user
70
+ add_ga_event('Ecommerce', 'Checkout', 'Gift Cards')
71
71
  end
72
72
 
73
73
  # Step 5 - Payment
@@ -109,8 +109,8 @@ module Caboose
109
109
  when 'payscape'
110
110
  @form_url = Caboose::PaymentProcessor.form_url(@order)
111
111
  end
112
- @logged_in_user = logged_in_user
113
- add_ga_event('checkout', 'payment')
112
+ @logged_in_user = logged_in_user
113
+ add_ga_event('Ecommerce', 'Checkout', 'Payment Form')
114
114
  end
115
115
 
116
116
  # GET /checkout/confirm
@@ -128,8 +128,8 @@ module Caboose
128
128
  return
129
129
  end
130
130
  end
131
- @logged_in_user = logged_in_user
132
- add_ga_event('checkout', 'confirm_without_payment')
131
+ @logged_in_user = logged_in_user
132
+ add_ga_event('Ecommerce', 'Checkout', 'Confirm Without Payment')
133
133
  end
134
134
 
135
135
  # POST /checkout/confirm
@@ -175,8 +175,8 @@ module Caboose
175
175
  @logged_in_user = logged_in_user
176
176
 
177
177
  # Find the last order for the user
178
- @last_order = Order.where(:customer_id => @logged_in_user.id).order("id desc").limit(1).first
179
- add_ga_event('checkout', 'thanks')
178
+ @last_order = Order.where(:customer_id => @logged_in_user.id).order("id desc").limit(1).first
179
+ add_ga_event('Ecommerce', 'Checkout', 'Payment', (@last_order.total*100).to_i)
180
180
  end
181
181
 
182
182
  #===========================================================================
@@ -27,7 +27,7 @@ module Caboose
27
27
  @sale_categories[cat] = [] if @sale_categories[cat].nil?
28
28
  @sale_categories[cat] << p
29
29
  end
30
- add_ga_event('products', 'view', 'Sales')
30
+ add_ga_event('Products', 'View', 'Sales')
31
31
  render 'caboose/products/sales' and return
32
32
 
33
33
  elsif params[:id].to_i > 0 && Product.exists?(params[:id])
@@ -39,7 +39,7 @@ module Caboose
39
39
  @reviews = Review.where(:product_id => @product.id).limit(10).order("id DESC") || nil
40
40
  @logged_in_user = logged_in_user
41
41
 
42
- add_ga_event('products', 'view', "Product #{@product.id}")
42
+ add_ga_event('Products', 'View', "Product #{@product.id}")
43
43
  render 'caboose/products/details' and return
44
44
  end
45
45
  end
@@ -119,7 +119,7 @@ module Caboose
119
119
  @category = if @filter['category_id'] then Category.find(@filter['category_id'].to_i) else nil end
120
120
 
121
121
  @pager.set_item_count
122
- add_ga_event('products', 'view', "Category #{cat.id}")
122
+ add_ga_event('Products', 'View', "Category #{cat.id}")
123
123
  end
124
124
 
125
125
  def show
@@ -1,16 +0,0 @@
1
- <% if ga_events && ga_events.count > 0 %>
2
- <script type='text/javascript'>
3
- <% ga_events.each do |arr| %>
4
- <%
5
- cat = arr[0] ? arr[0] : nil
6
- action = arr[1] ? arr[1] : nil
7
- label = arr[2] ? arr[2] : nil
8
- value = arr[3] ? arr[3] : nil
9
- arr2 = [cat, action]
10
- arr2 << (label ? label : '') if label || (label.nil? && value)
11
- arr2 << value if value
12
- %>
13
- ga('send', 'event', <% arr2.each do |x| %>, <%= raw Caboose.json(x) %><% end %>);
14
- <% end %>
15
- </script>
16
- <% end %>
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.6.20'
2
+ VERSION = '0.6.21'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.20
4
+ version: 0.6.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-13 00:00:00.000000000 Z
11
+ date: 2015-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg