{"id":22403364,"url":"https://github.com/springload/tagman-watcher","last_synced_at":"2025-03-27T00:45:13.013Z","repository":{"id":66138727,"uuid":"68352670","full_name":"springload/tagman-watcher","owner":"springload","description":"Tiny (1kb) utility for effiently watching browser events and sending them to Google Tag Manager","archived":false,"fork":false,"pushed_at":"2016-09-16T04:33:25.000Z","size":3,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-02-01T06:25:34.800Z","etag":null,"topics":["google-tag-manager","gtm"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/springload.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-16T04:31:16.000Z","updated_at":"2017-12-12T10:14:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"4487aad4-23f2-4fb4-825d-31552ebbbb0f","html_url":"https://github.com/springload/tagman-watcher","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/springload%2Ftagman-watcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springload%2Ftagman-watcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springload%2Ftagman-watcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springload%2Ftagman-watcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/springload","download_url":"https://codeload.github.com/springload/tagman-watcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245760935,"owners_count":20667893,"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":["google-tag-manager","gtm"],"created_at":"2024-12-05T09:16:56.106Z","updated_at":"2025-03-27T00:45:13.008Z","avatar_url":"https://github.com/springload.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TagMan Watcher\n\nUtility for sending browser events to Google Tag Manager.\n\nThese Events can be triggered by DOM events or manually triggered.\n\nUsage:\n\n    tagmanWatch(DOMEvent, selectors, [customFields]);\n\nExample:\n\n    \u003cscript src=\"tagman-watcher.js\"\u003e\u003c/script\u003e\n    \u003cscript\u003e\n        // listen for change events on inputs and selects\n        window.tagmanWatch('change', 'input,select');\n\n        // Also listen for blur events on selects\n        window.tagmanWatch('blur', 'select');\n    \u003c/script\u003e\n\nThis could also be written more concisely as,\n\n    \u003cscript src=\"tagman-watcher.js\"\u003e\u003c/script\u003e\n    \u003cscript\u003e\n        window.tagmanWatch(['change', 'input,select'], ['blur', 'select']);\n    \u003c/script\u003e\n\nAnd you can set additional data to be sent when the event fires by passing a third argument:\n\n       window.tagmanWatch(['change', 'input,select', {'event':'override', color:'red'}], ['blur', 'select']);\n\nThis lets you override the event from 'change' to the Tag Manager Event that you want.\n\nWithin your app you can also trigger custom events:\n\n    var domElement = document.querySelector(\"input\");\n\n    window.tagmanWatch.trigger(\"my-custom-event\", {value: domElement.value, customKey:\"foobar\"});\n\nAll events must be preregistered with Tag Manager for them to received by Google Tag Manager.\n\n## Requirements\n\nThis utility requires a global variable `dataLayer` from Tag Manager.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringload%2Ftagman-watcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspringload%2Ftagman-watcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringload%2Ftagman-watcher/lists"}