google_data_layer-rails 0.0.4 → 0.0.5

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: b27bdc124605b9c392557f4854c02507c35acb86
4
- data.tar.gz: bd5b1cd55b7ad6835a96d325ee42ed66aa450cee
3
+ metadata.gz: c09fba949b8e355ca35efe39db059ab316d90a59
4
+ data.tar.gz: 89b510e10a117d32cb86aff18e1e53b66714dab0
5
5
  SHA512:
6
- metadata.gz: 239b8842331210f342d45821b190785e2fcfd327e1de335a514484942dafc3c9008e9bf315ef65859fac53685523df09a75f6e6ef368dff7ee648264e4b3f9c3
7
- data.tar.gz: 56d485ae3aad5e0e47acc120cab3be9e2a422a8c4740635a8b664ace2711ca212f1271ffe88f64686e665f2740a1ae560453b1965cdccb7181ab39010cfc100f
6
+ metadata.gz: 0c1c0cad63aeaf7e6788f44ada2b405c5c403ffe0c6e15997d86b9d86f3038d1b4ad9d9353a7906ff3895287d9db88631fe5f078be012bd7504b00203414d01a
7
+ data.tar.gz: f48f4c37390beb2cfdc56902677dcbb30f3e12ee89c7ce2f10f041e63990f585a07341109100d963ecd39505bfbe390a0146350b0608fc92f668df4592274298
@@ -11,16 +11,17 @@ module GoogleDataLayerHelper
11
11
  end
12
12
  end
13
13
 
14
- def google_data_layer_embed_code(additional_properties = "")
14
+ def google_data_layer_embed_code(additional_parameters)
15
+ dataLayer = [
16
+ {
17
+ ga_id: GoogleDataLayerHelper::Rails::Config.google_id,
18
+ page_pageName: @google_data_layer_embed_code.to_s
19
+ }.merge(additional_parameters)
20
+ ]
15
21
  %Q{
16
22
  <!-- Google Data Layer -->
17
23
  <script type="text/javascript">
18
- var dataLayer = [{
19
- 'ga_id': '#{GoogleDataLayer::Rails::Config.google_id}',
20
- 'page_pageName': '#{@google_data_layer_page_name.to_s}',
21
- 'page_pageType': '#{@google_data_layer_page_type.to_s}',
22
- #{additional_properties}
23
- }];
24
+ var dataLayer = #{dataLayer.to_json};
24
25
 
25
26
  var dataLayerPushVirtualPageViewEvent = function (pageName) {
26
27
  dataLayer.push({
@@ -1,5 +1,5 @@
1
1
  module GoogleDataLayer
2
2
  module Rails
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_data_layer-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Rebora
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-30 00:00:00.000000000 Z
12
+ date: 2014-05-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  version: '0'
91
91
  requirements: []
92
92
  rubyforge_project:
93
- rubygems_version: 2.2.2
93
+ rubygems_version: 2.0.14
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: Rails helpers to add google data layer javascript to your pages