{"id":19730623,"url":"https://github.com/begriffs/autolytics","last_synced_at":"2025-02-27T20:22:37.527Z","repository":{"id":6900090,"uuid":"8149964","full_name":"begriffs/autolytics","owner":"begriffs","description":"An embarrassment of analytics riches","archived":false,"fork":false,"pushed_at":"2013-09-06T01:59:36.000Z","size":148,"stargazers_count":12,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-10T17:50:18.110Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/begriffs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-12T00:17:47.000Z","updated_at":"2016-05-18T21:09:21.000Z","dependencies_parsed_at":"2022-09-09T15:10:36.729Z","dependency_job_id":null,"html_url":"https://github.com/begriffs/autolytics","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/begriffs%2Fautolytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/begriffs%2Fautolytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/begriffs%2Fautolytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/begriffs%2Fautolytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/begriffs","download_url":"https://codeload.github.com/begriffs/autolytics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241055955,"owners_count":19901689,"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-11-12T00:17:01.565Z","updated_at":"2025-02-27T20:22:37.509Z","avatar_url":"https://github.com/begriffs.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## Rich Events for Google Analytics\n\nYou collect too little data about your visitors. Use this library to\ngather more data very easily.\n\nDo this\n\n1. Have Google Analytics already running on your site.\n1. Include `jquery-autolytics.js`\n1. Apply the plugin to any element on the page: `$('input, a').autolytics()`\n\nand behold\n\n* It will send detailed browser events to Google Analytics\n* And will name the event based on CSS selectors identifying the page element\n\n### Example\n\n```html\n\u003chtml\u003e\n  \u003cbody\u003e\n    \u003ca class=\"main\" href=\"#\"\u003eA link\u003c/a\u003e\n    \u003ca class=\"other\" href=\"#\"\u003eAnother link\u003c/a\u003e\n    \u003cinput type=\"text\"\u003e\u003c/input\u003e\n\n    // ... include jquery and jquery-autolytics\n    \u003cscript\u003e\n      $(function () {\n        // ... load google analytics\n\n        $('a, input').autolytics();\n      });\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nWhen I type `hi` into the input then click on the links it generates these events:\n\n```js\n[\"_trackEvent\", \"body \u003e input\", \"focus\"]\n[\"_trackEvent\", \"body \u003e input\", \"click\", \"228,24\"]\n[\"_trackEvent\", \"body \u003e input\", \"keypress\", 104]\n[\"_trackEvent\", \"body \u003e input\", \"keypress\", 105]\n[\"_trackEvent\", \"body \u003e input\", \"change\", \"hi\"]\n[\"_trackEvent\", \"body \u003e input\", \"blur\"]\n[\"_trackEvent\", \"body \u003e a.other\", \"click\", \"141,24\"]\n[\"_trackEvent\", \"body \u003e a.main\", \"click\", \"38,22\"]\n```\n\nThis is enough information to even replay the user typing in realtime!\n\n### Why more data?\n\nRecording events and identifying their originating dom elements can\ngive you information to define custom Analytics goals. You can watch\nvisitors' hesitation among various page elements and define goals inside\na single page, like \"the user opens a menu and clicks a submenu.\"\n\n\n### More Info\n\n\u003ctable\u003e\n\u003ccaption\u003eRecorded Events\u003c/caption\u003e\n\u003cthead\u003e\n  \u003ctr\u003e\u003cth\u003eEvent\u003c/th\u003e\u003cth\u003eExtra Info\u003c/th\u003e\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\u003ctd\u003eblur\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003echange\u003c/td\u003e\u003ctd\u003enew value\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003eclick\u003c/td\u003e\u003ctd\u003eX,Y\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003edblclick\u003c/td\u003e\u003ctd\u003eX,Y\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003efocus\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003ekeypress\u003c/td\u003e\u003ctd\u003ekeycode\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003eresize\u003c/td\u003e\u003ctd\u003ewidth x height\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003escroll\u003c/td\u003e\u003ctd\u003escroll-top\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr\u003e\u003ctd\u003esubmit\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n### Caveats\n\nGoogle does impose\n[limits](https://developers.google.com/analytics/devguides/collection/gajs/limits-quotas)\nto the amount of information you can capture but you're probably coming\nnowhere close right now, so take advantage of it. If you upgrade your\nanalytics account then you go collect even more.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbegriffs%2Fautolytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbegriffs%2Fautolytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbegriffs%2Fautolytics/lists"}