solidus_multi_domain 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/app/views/spree/shared/_google_analytics.html.erb +29 -32
- data/solidus_multi_domain.gemspec +1 -1
- metadata +2 -3
- data/circle.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a40529d83de05109a1f62a8f96574255905d659
|
4
|
+
data.tar.gz: f2874701ba71846ac29025f8f8c190294eb8301b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53e135eb6ac757ab14ee76e649d5a13daac89681b4a83ec486d9fa3e344d8af6a0e21ab66071394ec17fe8c4020df8f799f260ac06755e5f29cac42cf96c443b
|
7
|
+
data.tar.gz: c77f5c988453ae129a9a507b52ffa7675a52316f4a18ec81eb88ea2a55b035f0266514ba61eb21ce458f91356b66f7a26a046fafb28b339c69ae04ebb00dd853
|
data/README.md
CHANGED
@@ -40,6 +40,8 @@ Current features:
|
|
40
40
|
|
41
41
|
5. Google analytics trackers can be associated with a store.
|
42
42
|
|
43
|
+
Looking for additional information? Checkout out the [wiki](https://github.com/solidusio/solidus_multi_domain/wiki).
|
44
|
+
|
43
45
|
Install Instructions
|
44
46
|
--------------------
|
45
47
|
|
@@ -1,39 +1,36 @@
|
|
1
1
|
<% if tracker = current_tracker %>
|
2
|
+
<script>
|
3
|
+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
4
|
+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
5
|
+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
6
|
+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
2
7
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
_gaq.push(['_trackPageview']);
|
8
|
+
ga('create', '<%= tracker.analytics_id %>', 'auto');
|
9
|
+
ga('require', 'displayfeatures');
|
10
|
+
ga('send', 'pageview');
|
7
11
|
|
8
|
-
<% if
|
9
|
-
<%# more info: https://developers.google.com/analytics/devguides/collection/
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
]);
|
12
|
+
<% if @order && order_just_completed?(@order) %>
|
13
|
+
<%# more info: https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce %>
|
14
|
+
ga('require', 'ecommerce', 'ecommerce.js');
|
15
|
+
ga('ecommerce:addTransaction', {
|
16
|
+
'id': '<%= j @order.number %>', // Transaction ID. Required.
|
17
|
+
'affiliation': '<%= @order.store.name %>', // Affiliation or store name.
|
18
|
+
'revenue': '<%= @order.total %>', // Grand Total.
|
19
|
+
'shipping': '<%= @order.ship_total %>', // Shipping.
|
20
|
+
'tax': '<%= @order.tax_total %>', // Tax.
|
21
|
+
'currency': '<%= @order.currency %>' // local currency code.
|
22
|
+
});
|
20
23
|
<% @order.line_items.each do |line_item| %>
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
ga('ecommerce:addItem', {
|
25
|
+
'id': '<%= j @order.number %>', // Transaction ID. Required.
|
26
|
+
'name': '<%= j line_item.variant.product.name %>', // Product name. Required.
|
27
|
+
'sku': '<%= j (line_item.variant.sku || line_item.variant_id) %>', // SKU/code.
|
28
|
+
'category': '', // Category or variation.
|
29
|
+
'price': '<%= line_item.price %>', // Unit price.
|
30
|
+
'quantity': '<%= line_item.quantity %>' // Quantity.
|
31
|
+
});
|
29
32
|
<% end %>
|
30
|
-
|
33
|
+
ga('ecommerce:send');
|
31
34
|
<% end %>
|
32
|
-
|
33
|
-
(function() {
|
34
|
-
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
35
|
-
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
36
|
-
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
37
|
-
})();
|
38
|
-
<% end %>
|
35
|
+
</script>
|
39
36
|
<% end %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.name = "solidus_multi_domain"
|
6
|
-
s.version = "1.
|
6
|
+
s.version = "1.4.0"
|
7
7
|
s.summary = "Adds multiple site support to Solidus"
|
8
8
|
s.description = "Multiple Solidus stores on different domains - single unified backed for processing orders."
|
9
9
|
s.required_ruby_version = ">= 2.1"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_multi_domain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus
|
@@ -193,7 +193,6 @@ files:
|
|
193
193
|
- app/views/spree/shared/_google_analytics.html.erb
|
194
194
|
- app/views/spree/shared/_multi_domain_sidebar_entry.html.erb
|
195
195
|
- bin/rails
|
196
|
-
- circle.yml
|
197
196
|
- config/locales/en.yml
|
198
197
|
- config/locales/fr.yml
|
199
198
|
- config/locales/pl.yml
|