{"id":21561095,"url":"https://github.com/shimisnow/utm-manager","last_synced_at":"2026-03-01T18:32:26.903Z","repository":{"id":42956915,"uuid":"231142010","full_name":"shimisnow/utm-manager","owner":"shimisnow","description":"UTM Manager is a JavaScript library to extract and manipulate utm variables from a URL or string.","archived":false,"fork":false,"pushed_at":"2024-06-11T22:35:18.000Z","size":344,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-17T18:25:55.088Z","etag":null,"topics":["analytics-tracking","facebook-ads","utm-parameters"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/shimisnow.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-12-31T20:11:26.000Z","updated_at":"2024-09-23T09:27:01.000Z","dependencies_parsed_at":"2023-01-23T21:47:20.040Z","dependency_job_id":null,"html_url":"https://github.com/shimisnow/utm-manager","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/shimisnow/utm-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimisnow%2Futm-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimisnow%2Futm-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimisnow%2Futm-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimisnow%2Futm-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shimisnow","download_url":"https://codeload.github.com/shimisnow/utm-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimisnow%2Futm-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29978575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:35:47.903Z","status":"ssl_error","status_checked_at":"2026-03-01T16:35:44.899Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["analytics-tracking","facebook-ads","utm-parameters"],"created_at":"2024-11-24T09:18:51.262Z","updated_at":"2026-03-01T18:32:26.878Z","avatar_url":"https://github.com/shimisnow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## How to use\n\n- Download the `utm-manager-x.y.z.zip` file from the [latest release](https://github.com/shimisnow/utm-manager/releases).\n- Include the `UTMManager` libray in your project.\n\nUsing the library with tag `\u003cscript\u003e`:\n```html\n\u003cscript src=\"utm-manager.min.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n```\n\nUsing the library with [RequireJS](https://requirejs.org/):\n```js\nrequirejs(['UTMManager'], (UTMManager) =\u003e {\n  ...\n})\n```\n\n\nAfter loading the library you can do something as:\n\n```js\nconst utm = new UTMManager('https://domain.net/?utm_source=google\u0026utm_medium=cpc\u0026utm_campaign=campaign-01')\n\nutm.is('utm_source')\n  .equals('google')\n  .and()\n  .is('utm_medium')\n  .equals('cpc')\n  .then(() =\u003e {\n    console.log('Hey! This is a paid campaign from google!')\n  })\n  .otherwise(() =\u003e {\n    console.log('This is not a paid campaign from google!')\n  })\n```\n\nor\n\n```js\nconst utm = new UTMManager('https://domain.net/?utm_source=google\u0026utm_medium=cpc\u0026utm_campaign=campaign-01\u0026utm_term=term-01')\n\nlet term = ''\n\n// get utm_term if it exists and has value\nutm.is('utm_term')\n  .filled()\n  .then(() =\u003e {\n    term = utm.get( 'utm_term' )\n  })\n```\n\nThe given examples are the simple ones. Read the [basic section](doc/examples/basic.md) and [advanced section](doc/examples/advanced.md) for more examples.\n\n## Documentation\n\nUTMManager's documentation is included in the directory [doc](doc/) and each function can be viewed from the following links:\n\n#### Manipulation functions\n\n| function                                       | since |      |\n| :--------------------------------------------: | :---: | :--- |\n| [`UTMManager()`](doc/functions/utm-manager.md) | 1.0.0 | Parses an URL or string and extract the utm variables |\n| [`add()`](doc/functions/add.md)                | 1.1.0 | Adds one or more variables |\n| [`get()`](doc/functions/get.md)                | 1.0.0 | Returns the value of one or more variables |\n| [`remove()`](doc/functions/remove.md)          | 1.0.0 | Removes one or more variables |\n| [`set()`](doc/functions/set.md)                | 1.0.0 | Sets the value of one or more variables |\n| [`toString()`](doc/functions/to-string.md)     | 1.0.0 | Returns some or all variables grouped as a string |\n\n#### Condition functions\n\n| function                                    | since |      |\n| :-----------------------------------------: | :---: | :--- |\n| [`and()`](doc/functions/and.md)             | 1.0.0 | Performs an and operation with the result of two verification with is() |\n| [`defined()`](doc/functions/defined.md)     | 1.0.0 | Verifies if one or more variables are defined |\n| [`equals()`](doc/functions/equals.md)       | 1.0.0 | Verifies if one or more variables are equals the given value |\n| [`empty()`](doc/functions/empty.md)         | 1.0.0 | Verifies if one or more variables are empty |\n| [`filled()`](doc/functions/filled.md)       | 1.1.0 | Verifies if one or more variables are defined and has value |\n| [`not()`](doc/functions/not.md)             | 1.0.0 | Verifies if all given variables are different from the given value |\n| [`or()`](doc/functions/or.md)               | 1.0.0 | Performs an or operation with the result of two verification with is() |\n| [`undefined()`](doc/functions/undefined.md) | 1.0.0 | Verifies if one or more variables are undefined |\n\n#### Action functions\n\n| function                                         | since |      |\n| :----------------------------------------------: | :---: | :--- |\n| [`always()`](doc/functions/always.md)            | 1.0.0 | Execute if the performed verification with is() return either true or false |\n| [`otherwise()`](doc/functions/otherwise.md)      | 1.0.0 | Execute if the performed verification with is() return false |\n| [`sort()`](doc/functions/sort.md)                | 1.1.0 | Sorts the variables |\n| [`then()`](doc/functions/then.md)                | 1.0.0 | Execute if the performed verification with is() return true |\n\n#### Util functions\n\n| function                                         | since |      |\n| :----------------------------------------------: | :---: | :--- |\n| `result()`                                       | 1.0.0 | Return the boolean result from a condition function |\n| [`sort()`](doc/functions/sort.md)                | 1.1.0 | Sorts the variables |\n\n## How to build, lint and test\n\nThis tasks can be performed with Node.js or Docker containers. See the [developer documentation](doc/developer/main.md) for details.\n\n## Versioning\n\nThe release cycle is maintained under the [Semantic Versioning guidelines](https://semver.org/).\n\n## Bugs and feature requests\n\nHave a bug or a feature request? Please first search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.\n\n## Copyright and license\n\nCode and documentation copyright 2020 the UTM Manager Authors. Code released under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshimisnow%2Futm-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshimisnow%2Futm-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshimisnow%2Futm-manager/lists"}