spree_gtm 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/spree/gtm/_google_tag_manager_head.html.erb +9 -7
- data/spree_gtm.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32bfa6fc4c1f031c79a99a12342d18407f5514a0
|
4
|
+
data.tar.gz: eb0031f5f33d7a3d4087f61c0b6cd37013b034ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fc9500e8fdb0f4c299b7f2fb687fc95ae1053aa28ad36db6a14ec31577f21f3655def9f783dc22813998a8e6f5f6b3f7777cff5db0e90fe315a50977b5ae675
|
7
|
+
data.tar.gz: 3784d5efdf5ad265a922d83d277b16f53cc74063a8bce1c49480a39622fd832170b96c13bd632d4e40c5eeed3f0ba423401649627e1f186900c984bd6bab3730
|
@@ -18,15 +18,17 @@
|
|
18
18
|
<% if @order.present? and @order.user.present? %>
|
19
19
|
dataLayer.push({'userid': '<%= @order.user.id %>'});
|
20
20
|
<% end %>
|
21
|
-
<% if @order.present? %>
|
21
|
+
<% if @order.present? && @order.bill_address.present? %>
|
22
22
|
|
23
23
|
dataLayer.push({
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
24
|
+
'transactionId': '<%= @order.number %>',
|
25
|
+
'transactionTotal': <%= @order.total %>,
|
26
|
+
'transactionTax': <%= @order.adjustments.tax.sum(:amount) %>,
|
27
|
+
'transactionShipping': <%= @order.adjustments.shipping.sum(:amount) %>,
|
28
|
+
'transactionCity': '<%= @order.bill_address.city %>',
|
29
|
+
'transactionState': '<%= @order.bill_address.state_text %>',
|
30
|
+
'transactionZip': '<%= @order.bill_address.zipcode %>',
|
31
|
+
'transactionEmail': '<%= @order.email %>',
|
30
32
|
'transactionProducts': [
|
31
33
|
<%=raw @order.line_items.map { |line_item| "{ 'sku': '#{h line_item.variant.sku}',
|
32
34
|
'name': '#{h line_item.variant.product.name}',
|
data/spree_gtm.gemspec
CHANGED