sevenspan/laravel-google-utm
Composer 安装命令:
composer require sevenspan/laravel-google-utm
包简介
Adding Google UTM parameters to URL.
README 文档
README
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> <head></head> <body> <!-- Generate like http://www.site.com/dashboard?ref=logo --> {!! GUTM::add( url('/dashboard'), 'logo' ) !!} <!-- Generate like http://www.site.com/dashboard?utm_source=github&utm_medium=readme&utm_term=googleUTM&utm_content=ads&utm_campaign=githubRepo --> {!! GUTM::add( url('/dashboard'), [ 'github' , 'readme' , 'googleUTM' , 'ads' , 'githubRepo' ] ) !!} </body> </html>
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.
// config/app.php 'aliases' => [ ... 'GUTM' => Sevenspan\LaravelGoogleUTM\LaravelGoogleUTM::class, ... ];
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 1.45k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: The
- 更新时间: 2016-09-14