{"id":14955996,"url":"https://github.com/singhshivam/gaevents","last_synced_at":"2025-09-14T09:30:31.065Z","repository":{"id":56598711,"uuid":"114078291","full_name":"singhshivam/gaevents","owner":"singhshivam","description":"Provides integration for sending multiple events to Google Analytics","archived":false,"fork":false,"pushed_at":"2020-10-28T23:57:59.000Z","size":27,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-31T03:31:16.407Z","etag":null,"topics":["analytics","google-analytics","hacktoberfest","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/singhshivam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-13T05:32:36.000Z","updated_at":"2024-03-13T03:07:51.000Z","dependencies_parsed_at":"2022-08-15T21:40:33.902Z","dependency_job_id":null,"html_url":"https://github.com/singhshivam/gaevents","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singhshivam%2Fgaevents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singhshivam%2Fgaevents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singhshivam%2Fgaevents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singhshivam%2Fgaevents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/singhshivam","download_url":"https://codeload.github.com/singhshivam/gaevents/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232962563,"owners_count":18603379,"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":["analytics","google-analytics","hacktoberfest","ruby","ruby-on-rails"],"created_at":"2024-09-24T13:12:09.022Z","updated_at":"2025-01-08T02:12:40.835Z","avatar_url":"https://github.com/singhshivam.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/gaevents.svg)](https://badge.fury.io/rb/gaevents)\n[![Build Status](https://travis-ci.com/singhshivam/gaevents.svg?branch=master)](https://travis-ci.com/singhshivam/gaevents)\n\n# Gaevents\n\nThis gem allows you to update multiple background events in one go (via batches). Unlike other gems you do not need to load a js file to send events. Gaevents leverage GA's Measurement Protocol to send the events.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'gaevents'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install gaevents\n\n## Usage\n\nPlease refer [Measurement Protocol Parameter Reference](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters) for the list of all parameters accepted by the Protocol.\n\nThe following parameters are required in each event:\n`v`, `tid`, `cid` and `t`. This gem automatically injects `v`, make sure all events have `tid`, `cid` and `t` as parameters.\n\n```\nevents = []\n10.times { |n|\n\tevents \u003c\u003c GAEvents::Event.new({tid: GATRACKINGID, cid: \"ci#{n}\", t: 'event', ec: \"video#{n}\", ea: \"abc#{n}\", uid: \"user#{n}\"})\n}\nGAEvents.track(events)\n```\n\n## Migrating from 0.x to 1.x\n\nIn 0.x versions events were restricted to accepting only 5 parameters: `cid`, `ec`, `ea`, `el` and `ev` in the same order. Example:\n```\nGAEvents::Event.new(GOOGLE_API_CLIENT_ID, \"testcategory\", \"gaaction\")\n```\n1.x now accepts a hash that can have any number of acceptable parameters. The above line of code then becomes:\n```\nGAEvents::Event.new({tid: GATRACKINGID, cid: GOOGLE_API_CLIENT_ID, ec: \"testcategory\", ea: \"gaaction\"})\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/singhshivam/gaevents. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinghshivam%2Fgaevents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinghshivam%2Fgaevents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinghshivam%2Fgaevents/lists"}