2017 © Pedro Peláez
 

library laravel-google-utm

Adding Google UTM parameters to URL.

image

sevenspan/laravel-google-utm

Adding Google UTM parameters to URL.

  • Wednesday, September 14, 2016
  • by hemratna
  • Repository
  • 3 Watchers
  • 1 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

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., (*1)

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:, (*2)

{
    "require": {
       "sevenspan/laravel-google-utm": "dev-master"
    }
}

You must install a facade, which provides an easy way to call the the class., (*3)

// config/app.php
'aliases' => [
    ...
    'GUTM'      => Sevenspan\LaravelGoogleUTM\LaravelGoogleUTM::class,
    ...
];

License

The MIT License (MIT). Please see License File for more information., (*4)

The Versions

14/09 2016

dev-master

9999999-dev

Adding Google UTM parameters to URL.

  Sources   Download

The MIT License (MIT)

by Avatar hemratna