analytical 0.11.0 → 0.12.0
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.
- data/README.rdoc +1 -1
- data/VERSION +1 -1
- data/analytical.gemspec +2 -1
- data/lib/analytical/hubspot.rb +27 -0
- metadata +3 -2
data/README.rdoc
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
= Analytical
|
2
2
|
|
3
3
|
Gem for managing multiple analytics services in your rails app.
|
4
|
-
Service implementations include: Google Analytics, Clicky[http://getclicky.com], CrazyEgg[http://www.crazyegg.com], and KISSMetrics[http://kissmetrics.com].
|
4
|
+
Service implementations include: Google Analytics, Clicky[http://getclicky.com], CrazyEgg[http://www.crazyegg.com], Hubspot[http://www.hubspot.com], and KISSMetrics[http://kissmetrics.com].
|
5
5
|
|
6
6
|
== Usage
|
7
7
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.12.0
|
data/analytical.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{analytical}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.12.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Joshua Krall"]
|
@@ -82,6 +82,7 @@ Gem::Specification.new do |s|
|
|
82
82
|
"lib/analytical/console.rb",
|
83
83
|
"lib/analytical/crazy_egg.rb",
|
84
84
|
"lib/analytical/google.rb",
|
85
|
+
"lib/analytical/hubspot.rb",
|
85
86
|
"lib/analytical/kiss_metrics.rb",
|
86
87
|
"rails/init.rb",
|
87
88
|
"spec/analytical/api_spec.rb",
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Analytical
|
2
|
+
module Hubspot
|
3
|
+
class Api
|
4
|
+
include Analytical::Base::Api
|
5
|
+
|
6
|
+
def initialize(parent, options={})
|
7
|
+
super
|
8
|
+
@tracking_command_location = :body_append
|
9
|
+
end
|
10
|
+
|
11
|
+
def init_javascript(location)
|
12
|
+
return '' unless location==:body_append
|
13
|
+
js = <<-HTML
|
14
|
+
<!-- Analytical Init: Hubspot -->
|
15
|
+
<script type="text/javascript" language="javascript">
|
16
|
+
var hs_portalid=#{options[:portal_id]};
|
17
|
+
var hs_salog_version = "2.00";
|
18
|
+
var hs_ppa = "options[:domain]";
|
19
|
+
document.write(unescape("%3Cscript src='" + document.location.protocol + "//" + hs_ppa + "/salog.js.aspx' type='text/javascript'%3E%3C/script%3E"));
|
20
|
+
</script>
|
21
|
+
HTML
|
22
|
+
js
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 12
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.12.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Joshua Krall
|
@@ -118,6 +118,7 @@ files:
|
|
118
118
|
- lib/analytical/console.rb
|
119
119
|
- lib/analytical/crazy_egg.rb
|
120
120
|
- lib/analytical/google.rb
|
121
|
+
- lib/analytical/hubspot.rb
|
121
122
|
- lib/analytical/kiss_metrics.rb
|
122
123
|
- rails/init.rb
|
123
124
|
- spec/analytical/api_spec.rb
|