nowo-tech/marketing-kit-bundle

Symfony bundle to install and configure marketing tools (GTM, GA4, Meta Pixel, LinkedIn, TikTok, Hotjar, Clarity, custom) via YAML and/or Doctrine, with CookieConsent-compatible gating.

Maintainers

Package info

github.com/nowo-tech/MarketingKitBundle

Documentation

Type:symfony-bundle

pkg:composer/nowo-tech/marketing-kit-bundle

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-07-24 14:18 UTC

This package is auto-updated.

Last update: 2026-07-24 14:24:01 UTC


README

CI Packagist Version Packagist Downloads License PHP Symfony GitHub stars Coverage

Found this useful? Give it a star on GitHub! It helps us maintain and improve the project.

Symfony marketing kit: install and configure GTM, GA4, Meta Pixel, LinkedIn Insight, TikTok Pixel, Hotjar, Microsoft Clarity, and custom snippets via YAML profiles and/or Doctrine, with CookieConsent-compatible category gating.

FrankenPHP Friendly Worker Mode

This bundle is FrankenPHP worker mode friendly.

Features

  • Providers (v1)gtm, ga4, meta_pixel, linkedin, tiktok, hotjar, clarity, custom
  • YAML profilesdefault_profile + profiles (REQ-CFG-001)
  • Database overrideuse_database_config: true replaces YAML tools when DB rows exist for the profile
  • Twig helpersnowo_marketing_head(), nowo_marketing_body_start(), nowo_marketing_body_end()
  • CookieConsent-compatible — reads Cookie_Category_{analytics|marketing} (soft dependency)
  • Admin CRUD/admin/marketing to configure services (seed catalog, import YAML, toggle, typed option fields)

FrankenPHP: Demos use a single PHP service (FrankenPHP, no nginx). Runtime mode is controlled by FRANKENPHP_MODE in .env (worker default, or classic). The entrypoint selects Caddyfile (workers) or Caddyfile.dev (no workers) accordingly; see docs/DEMO-FRANKENPHP.md. Demo URL: http://localhost:8060 (see demo/README.md and .env.example).

Installation

composer require nowo-tech/marketing-kit-bundle
{# templates/base.html.twig #}
<head>
    {{ nowo_marketing_head() }}
</head>
<body>
    {{ nowo_marketing_body_start() }}
    {% block body %}{% endblock %}
    {{ nowo_marketing_body_end() }}
</body>

Optional GDPR gate (recommended):

composer require nowo-tech/cookie-consent-bundle

Quick configuration

# config/packages/nowo_marketing_kit.yaml
nowo_marketing_kit:
    use_database_config: false
    respect_cookie_consent: true
    default_profile: default
    profiles:
        default:
            enabled: true
            tools:
                gtm:
                    type: gtm
                    enabled: true
                    category: analytics
                    position: head
                    options:
                        container_id: '%env(default::GTM_ID)%'
                gtm_noscript:
                    type: gtm
                    enabled: true
                    category: analytics
                    position: body_start
                    options:
                        container_id: '%env(default::GTM_ID)%'
                meta_pixel:
                    type: meta_pixel
                    enabled: false
                    category: marketing
                    position: head
                    options:
                        pixel_id: '%env(default::META_PIXEL_ID)%'

Import admin routes when using the database admin:

# config/routes/nowo_marketing_kit.yaml
nowo_marketing_kit:
    resource: '@NowoMarketingKitBundle/Resources/config/routing.yaml'

Requirements

  • PHP >= 8.2, < 8.6
  • Symfony >= 7.4 || >= 8.0
  • Doctrine ORM (for entities / optional DB config)

Documentation

Additional documentation

Version information

Version PHP Symfony Status
1.0.0 >= 8.2, < 8.6 7.4 – 8.x Stable

Demos

make -C demo up-symfony8
# Demo started at: http://localhost:8060

Tests and coverage

Language Lines (approx.) Command
PHP 100% make test-coverage
TypeScript N/A
Python N/A
composer test
composer test-coverage