https://github.com/7span/laravel-google-utm
Laravel package to add Google UTM parameters to URL.
https://github.com/7span/laravel-google-utm
Last synced: about 1 year ago
JSON representation
Laravel package to add Google UTM parameters to URL.
- Host: GitHub
- URL: https://github.com/7span/laravel-google-utm
- Owner: 7span
- License: mit
- Created: 2016-09-14T09:19:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-14T13:21:00.000Z (over 9 years ago)
- Last Synced: 2025-02-25T13:13:16.311Z (about 1 year ago)
- Language: PHP
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Add Google UTM parameters with ease
This package will add Google UTM parameters to any Laravel URL.
This package will also help to add "ref" query string parameter to URL.
### In Your View
```html
{!! GUTM::add( url('/dashboard'), 'logo' ) !!}
{!! GUTM::add( url('/dashboard'), [ 'github' , 'readme' , 'googleUTM' , 'ads' , 'githubRepo' ] ) !!}
```
## Install
First add the package to your composer:
```
{
"require": {
"sevenspan/laravel-google-utm": "dev-master"
}
}
```
You must install a facade, which provides an easy way to call the the class.
```php
// config/app.php
'aliases' => [
...
'GUTM' => Sevenspan\LaravelGoogleUTM\LaravelGoogleUTM::class,
...
];
```
## License
The MIT License (MIT). Please see [License File](LICENSE) for more information.