rhincodon / utm-url-parser
UTM URL String Parser
Installs: 21 432
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 2
Forks: 4
Open Issues: 3
Requires
- php: >=5.4.0
Requires (Dev)
- phpspec/phpspec: ~2.1
This package is not auto-updated.
Last update: 2024-12-21 19:31:47 UTC
README
Install
Via Composer
$ composer require rhincodon/utm-url-parser
Usage
$utmUrl = 'http://test.com/test?utm_source=bing&&utm_medium=cpc&utm_campaign=rolex&utm_term=rolex+two'; $parser = new \Rhinodontypicus\Parsers\UtmParser(); $utmString = $parser->parse($utmUrl); if ($utmString->isValid()) { // true echo $utmString->source; // bing echo $utmString->medium; // cpc echo $utmString->campaign; // rolex echo $utmString->term; // rolex two }
Credits
License
The MIT License (MIT). Please see License File for more information.