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 +4 -4
- data/README.md +3 -7
- data/lib/gtm_rails/helper.rb +2 -0
- data/lib/gtm_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6e631b599c53c4da08df4e38914618e06a73eea3
|
|
4
|
+
data.tar.gz: 6235dd52f6b2e3a8af5f3029db7a82f5ee8ef805
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
data/lib/gtm_rails/helper.rb
CHANGED
|
@@ -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?
|
data/lib/gtm_rails/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2017-01-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|