forked from hybridgroup/gabba
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
150 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pkg/* | ||
*.gem | ||
.bundle | ||
Guardfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
gabba (0.0.1) | ||
gabba (0.1.1) | ||
|
||
GEM | ||
remote: http://rubygems.org/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,42 @@ | ||
== Simple class to send custom server-side events to Google Analytics | ||
Simple class to send custom server-side events to Google Analytics | ||
================================================================== | ||
|
||
Heavily influenced by the http://code.google.com/p/serversidegoogleanalytics | ||
|
||
HOW TO USE: | ||
----------- | ||
|
||
- Track page views | ||
Gabba::Gabba.new("UT-1234", "mydomain.com").page_view("something", "track/me") | ||
|
||
- Track custom events | ||
Gabba::Gabba.new("UT-1234", "mydomain.com").event("Videos", "Play", "ID", "123") | ||
|
||
|
||
IN THIS FORK: | ||
------------- | ||
|
||
* Setting custom vars | ||
|
||
# Index: 1 through 5 | ||
index = 1 | ||
|
||
# Scope: VISITOR, SESSION or PAGE | ||
scope = Gabba::Gabba::VISITOR | ||
|
||
# Set var | ||
gabba.set_custom_var(index, 'Name', 'Value', scope) | ||
|
||
# Track the event (all vars will be included) | ||
gabba.event(...) | ||
|
||
# Track the page view (all vars will be included) | ||
gabba.page_view(...) | ||
|
||
* Removing custom vars | ||
|
||
# Index: 1 through 5 | ||
index = 1 | ||
|
||
# Delete var with this index | ||
gabba.delete_custom_var index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters