Plugin Release
May 14, 2025

Inject Custom JavaScript and CSS in Shopware 6 Without Theme Changes

Manage JavaScript and CSS/SCSS snippets per sales channel and page—right from the Shopware admin.

Inject JavaScript and CSS with Ease in Shopware 6

Managing custom frontend scripts in Shopware can be a challenge—especially when you want to avoid editing theme files directly. That’s why I created the JavaScript and CSS Injector for Shopware 6, a plugin that gives you full control over your code snippets directly from the admin interface. No more theme overrides or plugin clutter—just clean, centralized management.

Key Features

  • Create unlimited containers for JavaScript, CSS, or SCSS
  • Target specific sales channels for each snippet
  • Define pages where the snippet should be injected (e.g., product detail, checkout)
  • Schedule start and end dates for activation—perfect for promotions or A/B testing
  • Supports English, German, Italian, and French

Requirements

  • Shopware 6.6 or higher

Installation

composer require swcommerce/javascript-css-injector
bin/console plugin:refresh
bin/console plugin:install -a SwCommerceJavascriptCSSInjector

Why This Matters

This plugin is ideal for developers, marketers, and merchants who need flexibility in customizing the storefront without relying on theme deployments or risking frontend regressions. Whether you're adding tracking scripts, promotional banners, or styling tweaks, this tool makes it fast, safe, and scalable.

It can also fully replace a slow-loading GTM setup by directly injecting the same code in a much faster, more controlled way—perfect for improving Core Web Vitals and keeping performance under control.

Start injecting smarter—no theme overrides required.

🔗 View source code on GitHub: sw-commerce/javascript-css-injector

Related blogs