{"id":17344121,"url":"https://github.com/splitrb/split-analytics","last_synced_at":"2025-03-22T19:33:33.088Z","repository":{"id":1550599,"uuid":"1931518","full_name":"splitrb/split-analytics","owner":"splitrb","description":":bar_chart: An extension to Split to push test data to Google Analytics.","archived":false,"fork":false,"pushed_at":"2022-02-22T23:02:53.000Z","size":53,"stargazers_count":50,"open_issues_count":3,"forks_count":12,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-18T14:05:50.077Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://libraries.io/rubygems/split-analytics","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/splitrb.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-06-21T20:47:51.000Z","updated_at":"2022-02-22T15:06:33.000Z","dependencies_parsed_at":"2022-07-12T14:55:44.290Z","dependency_job_id":null,"html_url":"https://github.com/splitrb/split-analytics","commit_stats":null,"previous_names":["andrew/split-analytics"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitrb%2Fsplit-analytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitrb%2Fsplit-analytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitrb%2Fsplit-analytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitrb%2Fsplit-analytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/splitrb","download_url":"https://codeload.github.com/splitrb/split-analytics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245013741,"owners_count":20547175,"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-10-15T16:16:53.519Z","updated_at":"2025-03-22T19:33:32.587Z","avatar_url":"https://github.com/splitrb.png","language":"Ruby","readme":"# [Split Analytics](http://libraries.io/rubygems/split-analytics)\n\n\u003e 📊 An extension to [Split](http://github.com/splitrb/split) to push test data to Google Analytics\n\n[![Build Status](https://secure.travis-ci.org/splitrb/split-analytics.svg?branch=master)](http://travis-ci.org/andrew/split-analytics)\n[![Gem Version](https://badge.fury.io/rb/split-analytics.svg)](http://badge.fury.io/rb/split-analytics)\n[![Dependency Status](https://gemnasium.com/splitrb/split-analytics.svg)](https://gemnasium.com/andrew/split-analytics)\n\n## Install\n\n### Requirements\n\nThe split gem and its dependencies.\n\n### Setup\n\nIf you are using bundler add split to your Gemfile:\n\n```ruby\ngem 'split-analytics', require: 'split/analytics'\n```\n\nThen run:\n\n```bash\nbundle install\n```\n\nOtherwise install the gem:\n\n```bash\ngem install split-analytics\n```\n\nand require it in your project:\n\n```ruby\nrequire 'split/analytics'\n```\n\n## Usage\n\nUse in your application layout template\n\nerb example:\n\n```erb\n\u003c%= tracking_code(account: 'UA-12345-6') %\u003e\n```\n\nhaml example:\n\n```haml\n= tracking_code(account: 'UA-12345-6')\n```\n\n### With Tracking Methods\n\nSee [Google Analytics Tracking Methods](https://developers.google.com/analytics/devguides/collection/gajs/methods/) for available options.\n\n```ruby\ntracker_methods = {\n  setDomainName: \"example.com\", # String argument\n  setAllowLinker: true, # Boolean argument\n  require: ['inpage_linkid', '//www.google-analytics.com/plugins/ga/inpage_linkid.js'] # Array argument (will be splattered)\n  clearOrganic: \"\" # No argument\n}\n```\n\nerb example:\n\n```erb\n\u003c%= tracking_code(account: 'UA-12345-6', tracker_methods: tracker_methods) %\u003e\n```\n\nhaml example:\n\n```haml\n= tracking_code(account: 'UA-12345-6', tracker_methods: tracker_methods)\n```\n### Other Tracking URLs\n\nYou can use other Tracking URLs with the option tracker_url and ssl_tracker_url.\n\nerb example:\n\n```erb\n\u003c%= tracking_code(account: 'UA-12345-6', tracker_url: 'stats.g.doubleclick.net/dc.js', ssl_tracker_url: 'stats.g.doubleclick.net/dc.js') %\u003e\n```\n\nhaml example:\n\n```haml\n= tracking_code(account: 'UA-12345-6', tracker_url: 'stats.g.doubleclick.net/dc.js', ssl_tracker_url: 'stats.g.doubleclick.net/dc.js')\n```\n\n## Contributing\n\nSource hosted at [GitHub](http://github.com/splitrb/split-analytics).\nReport Issues/Feature requests on [GitHub Issues](http://github.com/splitrb/split-analytics/issues).\n\nPlease follow the [Code of Conduct](CODE_OF_CONDUCT.md).\n\n### Note on Patches/Pull Requests\n\n * Fork the project.\n * Make your feature addition or bug fix.\n * Add tests for it. This is important so I don't break it in a\n   future version unintentionally.\n * Commit, do not mess with rakefile, version, or history.\n   (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)\n * Send me a pull request. Bonus points for topic branches.\n\n### Testing\n\nTests can be ran with `rake spec`.\n\n## License\n\nCopyright (c) 2015-2018 Andrew Nesbitt. See [LICENSE](LICENSE) for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplitrb%2Fsplit-analytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsplitrb%2Fsplit-analytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplitrb%2Fsplit-analytics/lists"}