spree_gtm 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7168e31b5ff42083d503f48cd047c83263948e8e
|
4
|
+
data.tar.gz: dc4687cdc2b1c5fd9971b15083095856fe3d4c3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6753e5d4a0bf2ee10ff2236f998e7a01c3c58f8222ee3f441e0dcd0722dba399e9bbb16101d822728501cf05777d74a367421bb1e3c38fd011b76efa286f2987
|
7
|
+
data.tar.gz: 9c86af5ddb47c489f151ef04897d4eb9d08366c1639c6e201b6572f21de42aefde8c935244fa3e6092c0a12ab3d0e98471134af2429e7c85887c55e231f002dc
|
data/app/models/spree/gtm.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
</
|
7
|
-
|
1
|
+
<% if Spree::Gtm.activated? %>
|
2
|
+
<!-- Google Tag Manager (noscript) -->
|
3
|
+
<noscript>
|
4
|
+
<iframe src="//www.googletagmanager.com/ns.html?id=<%= Spree::Gtm.gtm_accountid %>"
|
5
|
+
height="0" width="0" style="display:none;visibility:hidden">
|
6
|
+
</iframe>
|
7
|
+
</noscript>
|
8
|
+
<!-- End Google Tag Manager (noscript) -->
|
9
|
+
<% end %>
|
@@ -1,10 +1,12 @@
|
|
1
|
-
|
1
|
+
<% if Spree::Gtm.activated? %>
|
2
|
+
<!-- Google Tag Manager -->
|
2
3
|
|
3
|
-
<script>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
})(window,document,'script','dataLayer','<%= Spree::Gtm.gtm_accountid %>');
|
9
|
-
</script>
|
10
|
-
<!-- End Google Tag Manager -->
|
4
|
+
<script>
|
5
|
+
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
6
|
+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
7
|
+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
8
|
+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
9
|
+
})(window,document,'script','dataLayer','<%= Spree::Gtm.gtm_accountid %>');
|
10
|
+
</script>
|
11
|
+
<!-- End Google Tag Manager -->
|
12
|
+
<% end %>
|
data/spree_gtm.gemspec
CHANGED