mercredi 30 mars 2016

Get the referral source url in Laravel

I am a Laravel-newbie and have got the following piece of code in my landing page:

Route::get('/prelaunch', [ 'uses' => 'SubscriptionController@getReferrer', 'as' => 'subscriber.referral'], function () {
    return view('prelaunch');
});

What I would like to do, is to read a field such as "utm_source" from the url and store take some actions against it, such as counting the users that land into the page from twitter, fb etc.

Any suggestions on this one?

UPDATE

For example: the user lands on localhost/landing_page?utm_source=google when they come from google. What I need in this case is to read utm_source value and e.g. increase the count of the users that came from "google". Hope that helps a little bit.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1ZKpy1N
via IFTTT

Aucun commentaire:

Enregistrer un commentaire