plugin-icon

Profenv – Environment Profiles

Redwoodcity yazdı·
Store environment-specific values (GTM container ID, GA4 measurement ID, etc.) per environment and switch them automatically.
Sürüm
0.7.0
Son güncellenme
Jul 17, 2026
Profenv – Environment Profiles

Profenv stores environment-specific values (such as a GTM container ID and a GA4 measurement ID) for each of your environments (production, staging, and any additional sets) and switches them automatically based on the environment the site is currently running in. It solves the common migration problem where production settings cannot be reused on staging, and vice versa.

  • Four-step fallback environment detection: custom constant (wp-config.php), WP_ENVIRONMENT_TYPE (WP 5.5+), domain mapping, and undetermined as the last resort
  • When the environment cannot be determined, output of environment-specific values is suspended and a warning is shown in the admin screen. This prevents staging tags from ever firing on production
  • Field definitions (key and type, including code snippets) are shared across all environments, while each environment stores its own values
  • Each environment can also define environment-specific fields (key, type, and value) that exist only in that environment
  • When keys named gtm_id / ga4_id are defined and filled, the core plugin automatically outputs the GTM / GA4 tags with proper escaping; all other values are stored only and never output by the core plugin
  • Public API for extensions and themes: profenv_current_env(), profenv_get(), and profenv_get_all(), each with a filter equivalent that returns a safe default when the plugin is inactive
  • Shared field values are also readable through the standard option API — get_option( ‘profenv_gtm_id’ ) — and through ACF’s get_field() with the same prefixed name, always returning the current environment’s value
  • Extensions can register their own fields via the profenv_register_fields filter and reuse the settings infrastructure

External services

This plugin can connect to Google Tag Manager and Google Analytics 4, services provided by Google LLC. They are used to load the tag container / measurement snippet that the site administrator has configured. No connection is made at all unless you enter a GTM container ID and/or a GA4 measurement ID in the plugin settings.

When a GTM container ID is set, the standard Google Tag Manager snippet is output on every front-end page, and the visitor’s browser loads https://www.googletagmanager.com/gtm.js (plus https://www.googletagmanager.com/ns.html inside a noscript iframe). When a GA4 measurement ID is set, the standard Google tag (gtag.js) snippet is output, and the visitor’s browser loads https://www.googletagmanager.com/gtag/js. As a consequence of loading these scripts, the visitor’s IP address, user agent, and the URL of the visited page are transmitted to Google on every front-end page view, and Google may collect additional analytics data according to how your Tag Manager container or Analytics property is configured.

The plugin itself sends no data to Google; requests are made by the visitor’s browser only after you configure the IDs above. You are responsible for informing your visitors and obtaining any consent required in your jurisdiction (for example, via a consent management plugin).

Ücretsiz(ücretli paketlerde)
Kurulum işlemini tamamlayarak, WordPress.com'un Hizmet Şartları ile Üçüncü Taraf Eklenti Şartlarını kabul etmiş olursunuz.
Test edilen son sürüm
WordPress 7.0.2
Bu eklenti, sitenizde kullanılmak üzere indirilebilir.