gtm_rails 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9b47055f9b0503a5da6958685c6143684e8b848
4
- data.tar.gz: a7aedddc9f401bfbcb1830a7a4da44dcacd54d95
3
+ metadata.gz: 6e631b599c53c4da08df4e38914618e06a73eea3
4
+ data.tar.gz: 6235dd52f6b2e3a8af5f3029db7a82f5ee8ef805
5
5
  SHA512:
6
- metadata.gz: 7901270779c9cb549424e6c402014676fabec9a9664eadd47a8ade816d5ebb27810396bc3fb91848e81c82f630055e8646b9e5202011cb94219b071558bb3e53
7
- data.tar.gz: c3f811f8936e4afb3afc9f6e7ca2d2a4d38dac74d0eb0ee1779312f833398db74f50b8dd56d5970895ffe9198b83afd01dc6ae0c59d96148e88616f704cf9b42
6
+ metadata.gz: 52abc9596db36bb2d1abcd79e5c9386ae302db07707cf757b3a5b8050d196a05a9d5bb00d95c84e2018d6be0f274ebcdcecac79949dbe119b03edfd1bf23851f
7
+ data.tar.gz: 0f4b721d789bdd2996a6ec794e22b5781708ee943a3c69299122718263e82f6464c9faa9b4fa59bd6b2ba71d2dcdfb999fb9ef45faa583e91217a537f3b61a4f
data/README.md CHANGED
@@ -39,13 +39,7 @@ production:
39
39
 
40
40
  The above is a sample. `foo`, `bar`, `baz` are arbitrary label names, and replacing GTM-XXXX with your container ID.
41
41
 
42
- In view, use as follows. The argument is a label name specified in `config/google_tag_manager.yml`.
43
-
44
- ```ruby
45
- <%= google_tag_manager(:foo) %>
46
- ```
47
-
48
- Or do next 2 steps. (recommended, click here to [read more](https://developers.google.com/tag-manager/quickstart))
42
+ In view, use two helper methods. (Click here to [read more](https://developers.google.com/tag-manager/quickstart))
49
43
 
50
44
  First, following method as close to the opening `<head>` tag as possible on every page of your website.
51
45
 
@@ -59,6 +53,8 @@ Second, following method immediately after the opening `<body>` tag on every pag
59
53
  <%= google_tag_manager_noscript_tag(:foo) %>
60
54
  ```
61
55
 
56
+ These method arguments are a label name specified in `config/google_tag_manager.yml`.
57
+
62
58
  Google Tag Manager container snippet will be expanded based on `Rails.env` and label name. If there is no match, a blank string is returned.
63
59
 
64
60
  ## Contributing
@@ -1,6 +1,8 @@
1
1
  module GtmRails
2
2
  module Helper
3
3
  def google_tag_manager(label)
4
+ ActiveSupport::Deprecation.warn('`google_tag_manager` is deprecated and will be removed in gtm_rails (0.4.0) . Use `google_tag_manager_script_tag` and `google_tag_manager_noscript_tag` instead of `google_tag_manager`.')
5
+
4
6
  container_id = GtmRails::Config.container_ids[label]
5
7
 
6
8
  return '' if container_id.blank?
@@ -1,3 +1,3 @@
1
1
  module GtmRails
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtm_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koichi ITO
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-25 00:00:00.000000000 Z
11
+ date: 2017-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails