Download the PHP package solidwork/contao-solid-ads-tracker-bundle without Composer

On this page you can find all versions of the php package solidwork/contao-solid-ads-tracker-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package contao-solid-ads-tracker-bundle

Contao Solid Ads Tracker Bundle

A Contao 5.3 bundle for automatically tracking visitors who arrive via Google Ads (gclid) or Bing Ads (msclkid).

Features


Installation

Via Contao Manager (recommended)

  1. Open Contao Manager
  2. Search for solidwork/contao-solid-ads-tracker-bundle
  3. Install and update the database
  4. Run the required setup via SSH (see section below)

Via Composer

Then create the database table:


⚠️ Required: One-Time Setup

This step is mandatory. Without it, tracking will not work on production Contao installations that use the built-in HTTP cache.

Run the included setup command once after installation:

This command automatically:

  1. Adds QUERY_PARAMS_REMOVE_FROM_DENY_LIST=gclid,msclkid to your .env.local
  2. Clears the HTTP cache directory (var/cache/prod/http_cache/)

Why this is needed

Contao's built-in HTTP cache (ContaoCache) normalizes URLs before checking the cache. By default, it strips tracking parameters like gclid and msclkid:

The env variable QUERY_PARAMS_REMOVE_FROM_DENY_LIST=gclid,msclkid prevents this stripping, so each ad click URL gets its own cache entry and the tracking listener is called correctly.

Manual alternative: If you prefer, add QUERY_PARAMS_REMOVE_FROM_DENY_LIST=gclid,msclkid to .env.local by hand, then run rm -rf var/cache/prod/http_cache/ && php bin/console cache:clear.


Console Commands

Run setup (required once)

Configures .env.local and clears the HTTP cache:

Run database migration

After installation, create the table:

Load demo entries

To test the backend view with sample data:

Creates 10 realistic demo entries (Google Ads & Bing Ads) spread over 60 days. Visible in the Contao backend under System → Ads Tracker afterwards.


Backend Module

The module appears in the Contao backend under System → Ads Tracker.

List View

Displays all tracked visits with the following columns:

Column Description
# Entry ID
Source Google Ads or Bing Ads
Date & Time Timestamp of the visit
UTM Source utm_source parameter
UTM Medium utm_medium parameter
UTM Campaign utm_campaign parameter
Visited URL Full URL of the visit

Date Range Filter

A date range (From / To) can be entered in the top panel. After clicking Apply, the list is restricted to that period. The current entry count is displayed next to the filter:

Dropdown Filters

Filter by the following fields via dropdown:

Search

Full-text search across the following fields:

Detail View

Clicking the info icon opens the detail view with all stored fields for that entry.

Export

Use the Export CSV and Export JSON buttons to download all currently filtered entries. The export respects all active filters:

The filename automatically includes the date, time and active filters, e.g.:


How Does Tracking Work?

The bundle registers a Symfony event listener on kernel.request (priority 8). On every GET request it checks for a gclid (Google Ads) or msclkid (Bing Ads) parameter in $_GET. If found, the visit is immediately saved to the database.

AJAX requests are ignored. If an error occurs (e.g. table not yet created), the listener fails silently without affecting the page.

Contao HTTP Cache compatibility

Contao uses a built-in HTTP cache (ContaoCache) in production. Without the QUERY_PARAMS_REMOVE_FROM_DENY_LIST configuration described above, the tracking listener will never be called for ad clicks because:

  1. Contao strips gclid/msclkid from the URL to create a normalised cache key
  2. The normalised URL (e.g. /?) likely exists in cache → the cached response is returned directly
  3. The inner Symfony application (and therefore this listener) is never invoked

With the env variable set, each gclid/msclkid URL gets its own cache entry and the full request reaches the tracking listener correctly.


Database Structure (tl_solid_ads_visit)

Column Type Description
id INT Primary key, auto-increment
tstamp INT Unix timestamp (internal)
source VARCHAR(10) google or bing
visited_at VARCHAR(20) Date & time (Y-m-d H:i:s)
page_url TEXT Full URL of the visited page
gclid VARCHAR(255) Google Ads Click-ID
msclkid VARCHAR(255) Bing Ads Click-ID
utm_source VARCHAR(255) UTM parameter: source
utm_medium VARCHAR(255) UTM parameter: medium
utm_campaign VARCHAR(255) UTM parameter: campaign
utm_term VARCHAR(255) UTM parameter: term
utm_content VARCHAR(255) UTM parameter: content
referrer TEXT HTTP referrer header
user_agent TEXT Browser / user agent

Requirements


License

LGPL-3.0-or-later – see LICENSE

Author

Solidwork


All versions of contao-solid-ads-tracker-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
contao/core-bundle Version ^5.3
contao/manager-plugin Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package solidwork/contao-solid-ads-tracker-bundle contains the following files

Loading the files please wait ...