PHP Package: spatie/laravel-googletagmanager

A PHP library that integrates Google Tag Manager into Laravel for enhanced SEO capabilities and tracking functionalities.

Current Version: 3.0.0
Last Updated: 2025-09-12
PHP Requirement: ^8.2
Dependencies:
illuminate/support
spatie/laravel-package-tools
⚠️ To ensure full functionality, the above dependencies might be required.

Package Description

Laravel Google Tag Manager is a comprehensive library designed to seamlessly incorporate Google Tag Manager functionality into Laravel projects. It provides an intuitive way to manage tags, triggers, and variables for optimized SEO strategies and enhanced tracking mechanisms. This library simplifies the process of implementing GTM on your Laravel application, ensuring improved SEO performance and efficient tag management.

📦 Show all available classes🔗 View on GitHub

Download Latest Version: 3.0.0

Download Download v3.0.0

Previous Versions

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php
// Example from PHPlibraries.com
require_once 'libs/spatie/laravel-googletagmanager/3.0.0/loader.php';
require_once 'libs/illuminate/support/12.33.0/loader.php';
require_once 'libs/spatie/laravel-package-tools/1.92.7/loader.php';

use Spatie\GoogleTagManager\GoogleTagManager;
use Illuminate\Support\ServiceProvider;

$obj = new GoogleTagManager();
echo '✅ Test OK: ' . get_class($obj);
?>

We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.

Community Discussion

Ask questions, share tips, or report issues below.