{"id":13463233,"url":"https://github.com/hybridgroup/gabba","last_synced_at":"2025-12-30T00:00:36.384Z","repository":{"id":56847948,"uuid":"1116182","full_name":"hybridgroup/gabba","owner":"hybridgroup","description":"Simple way to send server-side notifications to Google Analytics","archived":false,"fork":false,"pushed_at":"2014-05-22T02:03:15.000Z","size":437,"stargazers_count":460,"open_issues_count":10,"forks_count":54,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-10-29T13:50:37.623Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hybridgroup.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-11-27T03:57:27.000Z","updated_at":"2024-10-22T22:40:50.000Z","dependencies_parsed_at":"2022-09-09T07:50:28.665Z","dependency_job_id":null,"html_url":"https://github.com/hybridgroup/gabba","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Fgabba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Fgabba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Fgabba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Fgabba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hybridgroup","download_url":"https://codeload.github.com/hybridgroup/gabba/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245413954,"owners_count":20611355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T13:00:48.652Z","updated_at":"2025-12-30T00:00:31.319Z","avatar_url":"https://github.com/hybridgroup.png","language":"Ruby","funding_links":[],"categories":["Analytics","Ruby"],"sub_categories":[],"readme":"# Gabba\n\n[![Build Status](https://travis-ci.org/hybridgroup/gabba.png)](https://travis-ci.org/hybridgroup/gabba)\n\nSimple class to send custom server-side events to Google Analytics\n\nHeavily influenced by the [serversidegoogleanalytics][] project.\n\n## Examples\n\n### Track page views\n\n```ruby\nGabba::Gabba.new(\"UT-1234\", \"mydomain.com\").page_view(\"something\", \"track/me\")\n```\n\n### Track custom events\n\n```ruby\nGabba::Gabba.new(\"UT-1234\", \"mydomain.com\").event(\"Videos\", \"Play\", \"ID\", \"123\", true)\n```\n\n### Works with existing client-side Google Analytics cookies\n\n```ruby\ngabba = Gabba::Gabba.new(\"UT-1234\", \"mydomain.com\")\n\n# grab the __utma and (optionally) __utmz unique identifiers\ngabba.identify_user(cookies[:__utma], cookies[:__utmz])\n\n# trigger actions as normal\ngabba.page_view(\"something\", \"track/me\")\n```\n\n### Setting custom vars\n\n```ruby\n# Index: 1 through 50\nindex = 1\n\n# Scope: VISITOR, SESSION or PAGE\nscope = Gabba::Gabba::VISITOR\n\n# Set var\ngabba.set_custom_var(index, 'Name', 'Value', scope)\n\n# Track the event (all vars will be included)\ngabba.event(...)\n\n# Track the page view (all vars will be included)\ngabba.page_view(...)\n```\n\n### Removing custom vars\n\n```ruby\n# Index: 1 through 50\nindex = 1\n\n# Delete var with this index\ngabba.delete_custom_var index\n```\n\n### Track ecommerce transactions\n\n```ruby\ng = Gabba::Gabba.new(\"UT-6666\", \"myawesomeshop.net\")\ng.transaction(\"123456789\", \"1000.00\", 'Acme Clothing', '1.29', '5.00', 'Los Angeles', 'California', 'USA')\n```\n\n### License\n\nGabba is released under the [MIT License](http://opensource.org/licenses/MIT).\n\n\n[serversidegoogleanalytics]: http://code.google.com/p/serversidegoogleanalytics\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhybridgroup%2Fgabba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhybridgroup%2Fgabba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhybridgroup%2Fgabba/lists"}