satellite 0.2.1 → 0.2.2
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/VERSION +1 -1
- data/lib/satellite/adapters/google_analytics.rb +3 -2
- data/satellite.gemspec +1 -1
- data/test/test_satellite.rb +11 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
@@ -19,7 +19,7 @@ module Satellite
|
|
19
19
|
#end
|
20
20
|
|
21
21
|
# actually send request
|
22
|
-
open(utm_url, { "User-Agent" => 'Satellite/0.
|
22
|
+
open(utm_url, { "User-Agent" => 'Satellite/0.2.1', "Accept-Language" => utm_params[:utmul] || 'de' })
|
23
23
|
|
24
24
|
# reset events / custom variables here
|
25
25
|
utm_params.delete(:utme)
|
@@ -69,7 +69,8 @@ module Satellite
|
|
69
69
|
|
70
70
|
# seems to be the current version
|
71
71
|
# search for 'utmwv' in http://www.google-analytics.com/ga.js
|
72
|
-
VERSION =
|
72
|
+
#VERSION = '4.4sh'
|
73
|
+
VERSION = '5.1.5'
|
73
74
|
UTM_GIF_LOCATION = ".google-analytics.com/__utm.gif"
|
74
75
|
|
75
76
|
# adds default params
|
data/satellite.gemspec
CHANGED
data/test/test_satellite.rb
CHANGED
@@ -53,13 +53,18 @@ class TestSatellite < Test::Unit::TestCase
|
|
53
53
|
#utmu
|
54
54
|
should "properly track a page view" do
|
55
55
|
tracker = Satellite.get_tracker(:google_analytics, VALID_GOOGLE_ANALYTICS_PARAMS)
|
56
|
+
assert_equal tracker.track_page_view, true
|
57
|
+
end
|
56
58
|
|
59
|
+
should "properly track a custom variable" do
|
60
|
+
tracker = Satellite.get_tracker(:google_analytics, VALID_GOOGLE_ANALYTICS_PARAMS)
|
61
|
+
tracker.set_custom_variable(1, 'test', 'unit-tester')
|
57
62
|
assert_equal tracker.track_page_view, true
|
58
63
|
end
|
59
64
|
|
60
65
|
should "properly track a page view with given path" do
|
61
66
|
tracker = Satellite.get_tracker(:google_analytics, VALID_GOOGLE_ANALYTICS_PARAMS)
|
62
|
-
|
67
|
+
|
63
68
|
path = "/test/path_test"
|
64
69
|
tracker.track_page_view(path)
|
65
70
|
tracker_path = tracker[:utmp].dup
|
@@ -67,6 +72,11 @@ class TestSatellite < Test::Unit::TestCase
|
|
67
72
|
assert_equal tracker_path, path
|
68
73
|
end
|
69
74
|
|
75
|
+
should "properly track an event" do
|
76
|
+
tracker = Satellite.get_tracker(:google_analytics, VALID_GOOGLE_ANALYTICS_PARAMS)
|
77
|
+
assert_equal tracker.track_event("test", "unit-test", Time.now.to_s), true
|
78
|
+
end
|
79
|
+
|
70
80
|
context 'utme' do
|
71
81
|
|
72
82
|
should "properly parse given utme string" do
|
metadata
CHANGED