{"id":17037983,"url":"https://github.com/kzu/trackr","last_synced_at":"2026-04-29T16:03:31.458Z","repository":{"id":22606580,"uuid":"25948755","full_name":"kzu/Trackr","owner":"kzu","description":"A Google Analytics and Xamarin Insights tracking forwarder","archived":false,"fork":false,"pushed_at":"2015-06-24T20:21:16.000Z","size":183,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-21T16:03:20.129Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kzu.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":"2014-10-30T01:09:52.000Z","updated_at":"2021-07-08T19:19:27.000Z","dependencies_parsed_at":"2022-08-21T09:30:24.680Z","dependency_job_id":null,"html_url":"https://github.com/kzu/Trackr","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kzu/Trackr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kzu%2FTrackr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kzu%2FTrackr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kzu%2FTrackr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kzu%2FTrackr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kzu","download_url":"https://codeload.github.com/kzu/Trackr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kzu%2FTrackr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32432917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-14T08:55:38.281Z","updated_at":"2026-04-29T16:03:31.418Z","avatar_url":"https://github.com/kzu.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"Trackr\n======\n\nA Google Analytics tracking forwarder\n\n## Problem\n\nSay you have a simple static site in Amazon S3, a GitHub wiki, a static podcast feed, etc., and you just want to \ntrack page views / downloads of specific assets. It may be that you don't control the client where the requests \nare made (i.e. a feed reader or some external app that consumes those assets). In those cases, you need a server-side \nsolution that can call Google Analytics with the tracking information, prior to letting users download (typically \nvia a redirect). \n\nNow you have to read about how to do it (not that it's too complicated, as you can see in this implementation ;)).\n\n## Solution\n\nYou just fork this repo, publish it to Azure (or whatever app platform that runs bare-bones ASP.NET 4.0 or later) and \noptionally provide any of the supported [Google Analytics Measurement Protocol parameters](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters) \nvia app settings. These parameters via settings can be overriden on a per-request/url basis, so they are essentially \nyour defaults. \n\nMake sure you provide one way (app settings) or the other (url query string) all the [required parameters](https://developers.google.com/analytics/devguides/collection/protocol/v1/reference#required).\n\n\u003e Note: [Client ID or cid](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cid) \n\u003e is treated specially. If not received as a url query string parameter, a new Guid will be generated on the handler \n\u003e and it will be set as a cookie named \"cid\" for reuse in future requests.\n \nThe domain you want to redirect to can be specified one way (app settings) or the other (url query string) with the \n[Document Host Name or dh](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#dh) \nparameter.\n\nAnd that's it! Any URL that you send to this new website will push that pageview to Google Analytics with the given \nparameters, passing on the client IP and user agent, and ultimately redirect to same file but on the \"dh\" domain.\n\n\u003e Note: it only does GET redirects.\n\n\n### Xamarin Insights Support\n\n[Xamarin Insights](http://xamarin.com/insights) is a new analytics offering by [Xamarin](http://www.xamarin.com) that provides many of the benefits \nof Google Analytics, with a far friendlier and simpler UI.\n\nIf you want to report to Xamarin Insights, just add the following app settings to your deployment: \n* Insights.ApiKey: the API key for your Insights app \n* Insights.AppName: the name of the application as created in Insights.\n\nFrom this point on, every URL request (or also via the app settings) can specify the Application Name, ID, Version \nand Installer ID as documented in [App Tracking](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#apptracking) \nand that information will be used to identify the client.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkzu%2Ftrackr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkzu%2Ftrackr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkzu%2Ftrackr/lists"}