referrer_tracker 0.0.1 → 0.0.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/README.rdoc +34 -0
- data/Rakefile +2 -2
- data/init.rb +1 -0
- data/lib/referrer_tracker.rb +13 -2
- data/referrer_tracker.gemspec +3 -3
- metadata +5 -5
- data/README +0 -21
data/README.rdoc
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
ReferrerTracker
|
2
|
+
===============
|
3
|
+
|
4
|
+
This plugin tracks the source of the traffic for you and also tracks the conversations happening in your rails project.
|
5
|
+
|
6
|
+
Example
|
7
|
+
=======
|
8
|
+
|
9
|
+
In referrer_tracker.yml file in cofig directory -
|
10
|
+
|
11
|
+
track1:
|
12
|
+
actions: "home#index home#dashboard" #These actions will be tracked - with first as landingpage and second as dashboard page.
|
13
|
+
conversion: true #if set to true, this will track the conversions.
|
14
|
+
conversion_rate: true #if set to true, this will also save landingpage hits, based on which conversion_rate can be calculated.
|
15
|
+
referreral_parameter: sr # on successfull converstion it will credit ?sr= parameter as source. If left null, credit will be given to url, the user came from.
|
16
|
+
|
17
|
+
Installation
|
18
|
+
=============
|
19
|
+
Install the gem as -
|
20
|
+
|
21
|
+
gem install referrer_tracker
|
22
|
+
|
23
|
+
Then run the migrations using -
|
24
|
+
|
25
|
+
rake db:migrate:rt_setup
|
26
|
+
|
27
|
+
This way, it will create a table in your database named - referrer_track.
|
28
|
+
|
29
|
+
Then add a referrer_tracker.yml file inside the config directory and add the configuration as shown in above example.
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
Copyright (c) 2011 [name of plugin creator], released under the MIT license
|
34
|
+
Webonise Software Solutions.
|
data/Rakefile
CHANGED
@@ -30,6 +30,6 @@ Jeweler::Tasks.new do |gem|
|
|
30
30
|
gem.description = %Q{It pulls in the ?ref= and ?sr= type references from urls and marks visitor comings from those urls.}
|
31
31
|
gem.email = "rtdp@weboniselab.com"
|
32
32
|
gem.authors = ["rtdp"]
|
33
|
-
gem.version = "0.0.
|
33
|
+
gem.version = "0.0.2"
|
34
34
|
end
|
35
|
-
Jeweler::RubygemsDotOrgTasks.new
|
35
|
+
Jeweler::RubygemsDotOrgTasks.new
|
data/init.rb
CHANGED
data/lib/referrer_tracker.rb
CHANGED
@@ -6,13 +6,20 @@ end
|
|
6
6
|
module ReferrerTracker
|
7
7
|
include Utils
|
8
8
|
|
9
|
+
#
|
10
|
+
# This is being called by basic before filter and used to check if conditions from config satisfies..
|
11
|
+
#
|
12
|
+
#
|
9
13
|
def notice_referrer
|
10
14
|
if config_actions.include?(current_c_a_pair)
|
11
15
|
create_track_value
|
12
16
|
end
|
13
17
|
end
|
14
18
|
|
15
|
-
|
19
|
+
#
|
20
|
+
# Checks for correct configuratios and saves track.
|
21
|
+
#
|
22
|
+
#
|
16
23
|
def create_track_value
|
17
24
|
if step==1
|
18
25
|
create_for_step(1, current_source_value) if conversion_rate? && source_match?
|
@@ -24,7 +31,9 @@ module ReferrerTracker
|
|
24
31
|
end
|
25
32
|
end
|
26
33
|
|
27
|
-
|
34
|
+
#
|
35
|
+
# Called to save the track
|
36
|
+
#
|
28
37
|
def create_for_step(step, source)
|
29
38
|
ReferrerTrack.create(:step => step,
|
30
39
|
:track => current_track,
|
@@ -32,3 +41,5 @@ module ReferrerTracker
|
|
32
41
|
end
|
33
42
|
|
34
43
|
end
|
44
|
+
|
45
|
+
require 'referrer_tracker/utils'
|
data/referrer_tracker.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{referrer_tracker}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["rtdp"]
|
@@ -13,11 +13,11 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.description = %q{It pulls in the ?ref= and ?sr= type references from urls and marks visitor comings from those urls.}
|
14
14
|
s.email = %q{rtdp@weboniselab.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
|
-
"README"
|
16
|
+
"README.rdoc"
|
17
17
|
]
|
18
18
|
s.files = [
|
19
19
|
"MIT-LICENSE",
|
20
|
-
"README",
|
20
|
+
"README.rdoc",
|
21
21
|
"Rakefile",
|
22
22
|
"init.rb",
|
23
23
|
"install.rb",
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: referrer_tracker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- rtdp
|
@@ -26,10 +26,10 @@ executables: []
|
|
26
26
|
extensions: []
|
27
27
|
|
28
28
|
extra_rdoc_files:
|
29
|
-
- README
|
29
|
+
- README.rdoc
|
30
30
|
files:
|
31
31
|
- MIT-LICENSE
|
32
|
-
- README
|
32
|
+
- README.rdoc
|
33
33
|
- Rakefile
|
34
34
|
- init.rb
|
35
35
|
- install.rb
|
data/README
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
ReferrerTracker
|
2
|
-
===============
|
3
|
-
|
4
|
-
This plugin tracks the source of the traffic for you and also tracks the conversations happening in your rails project.
|
5
|
-
|
6
|
-
Example
|
7
|
-
=======
|
8
|
-
|
9
|
-
In referrer_tracker.yml file in cofig directory -
|
10
|
-
|
11
|
-
track1:
|
12
|
-
start_action: "home", "index" #This will set landingpage.
|
13
|
-
end_action: "user", "create" #This will be action of successfull conversion. user signup in this case.
|
14
|
-
conversion: true #if set to true, this will track the conversions.
|
15
|
-
conversion_rate: true #if set to true, this will also save landingpage hits, based on which conversion_rate can be calculated.
|
16
|
-
referreral_parameter: sr # on successfull converstion it will credit ?sr= parameter as source. If left null, credit will be given to url, the user came from.
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
Copyright (c) 2011 [name of plugin creator], released under the MIT license
|
21
|
-
Webonise Software Solutions.
|