rack_google_tag_manager 1.0.0 → 1.0.1

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: cc8af5dcf4324b0118bf19a3d9f99fd7fd9945de
4
- data.tar.gz: 16105a7d9ea57be1bdfec07318252ddc2bf26d37
3
+ metadata.gz: 495afeaac736fcb44e18c3b8dd1cabfb3f13b237
4
+ data.tar.gz: c92e9c8c5c58321d4db9947da5c617b50992c2ee
5
5
  SHA512:
6
- metadata.gz: b61054a57157c2a83f147dffb57912d45982f59cee1705528657be4cc2fac4145721e2868006272cc67fe5668b53ff84093310a0d3b081187a4ca7a0541b7ff8
7
- data.tar.gz: a3835c2c0784e0794bc53fef0e66ba6061eeb3d260c3b838db3d2750f39d29ae9dd5717aa4c95439bd4f1a9888ca47942f0af7d2c00b36f6460b4b483cfe780f
6
+ metadata.gz: c98ec973e8616c1c87f00b3af6094942f8bda8b29748ea24b7d7dda4ef16de42b2597fe9624d7af3352cd11a81c8151a26e74e447b23717143efa68823e7c5ef
7
+ data.tar.gz: 49c226d82fb43f6a59e3b4d5b4cdc3d10089b2482ededc900fcc541d14550ee4bf1322b8e87f1f3309ad25a7c7e2ed7f0481c7a920827fed5577546aed84685b
data/README.md CHANGED
@@ -33,11 +33,14 @@ the existing ones.
33
33
 
34
34
  In order for the `push` API so be usable, the *dataLayer* must first be
35
35
  declared as an array, the GTM JavaScript snippet inserted at the
36
- top of the body will declare it for us.
37
-
38
- This initial declaration must occur before snippet. Since the snippet
39
- must appear at the very top of the body, then the *dataLayer* declaration
40
- must be the very first item in the body.
36
+ top of the body will declare it for you.
37
+
38
+ If your *tags* need to fire when pages load, but need information beyond URL
39
+ and referrer, you may need to define the *dataLayer* and pushes information to
40
+ it. Add this code above the container snippet so that the data layer information
41
+ is available on page load. Note that every page must have the code to create a
42
+ *dataLayer* and push information to it; the *dataLayer* does not persist across
43
+ pages.
41
44
 
42
45
  ## Contributing
43
46
 
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class GoogleTagManager
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  end
5
5
  end
@@ -48,7 +48,6 @@ module Rack
48
48
  </noscript>
49
49
 
50
50
  <script>
51
- dataLayer = [];
52
51
  (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
53
52
  new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
54
53
  j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
@@ -12,10 +12,6 @@ module Rack
12
12
  it 'adds the container snippet after body tag' do
13
13
  expect(subject).to match(%r[<body.*?>.*#{tracker_id}.*Works!<\/body>]m)
14
14
  end
15
-
16
- it 'includes the dataLayer declaration' do
17
- expect(subject).to include('dataLayer = []')
18
- end
19
15
  end
20
16
 
21
17
  context 'for a text/html response with uppercase html tags' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack_google_tag_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ancor Cruz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-12 00:00:00.000000000 Z
11
+ date: 2015-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler