Skip to content

Google Tag Manager tracking module for Laravel

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
license.md
Notifications You must be signed in to change notification settings

joaodman/Laravel-Google-Tag-Manager

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Google Tag Manager

Latest Stable Version Total Downloads License

Google tag manager features including events, ecommerce, and dataLayer support

Authors: Andrew Mc Cormack, Simone Todaro

Installation

Composer

Require this package with composer:

composer require cyber-duck/laravel-google-tag-manager

Framework

Add the following to the list of service providers in your config/app.php file

'CyberDuck\LaravelGoogleTagManager\GTMServiceProvider',

Add the following alias to your config/app.php file

'GTM' => 'CyberDuck\LaravelGoogleTagManager\Facades\GTM',

Publish configuration file:

php artisan vendor:publish --provider="CyberDuck\LaravelGoogleTagManager\GTMServiceProvider"

Configure your GTM-XXXXX ID in config/gtm.php

Usage

Within your main blade layout template include the GTM blade template

@include('tracking::gtm')

Pushing additional data

\GTM::data('paramName', 'paramValue')

Pushing an event

\GTM::event('eventName')

Flashing data for the next request

\GTM::flash()
return redirect()->action('...');

Enhanced Ecommerce

Coming soon!!!

About

Google Tag Manager tracking module for Laravel

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
license.md

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 98.0%
  • HTML 2.0%