greenpeace / planet4-gpch-plugin-optimize
A/B Testing and Personalization for Planet4 and Mixpanel
Package info
github.com/GreenpeaceSchweiz/planet4-gpch-plugin-optimize
Language:JavaScript
Type:wordpress-plugin
pkg:composer/greenpeace/planet4-gpch-plugin-optimize
Requires (Dev)
- wp-coding-standards/wpcs: ^3.0
This package is auto-updated.
Last update: 2026-06-17 05:34:04 UTC
README
Testing and personalization functionality for WordPress/Planet4 websites that use Mixpanel for web analytics.
Content optimizations can now be used in two modes:
Experiment: tracked optimization that sends experiment events to the configured analytics destination.Personalization: tailored content that does not send experiment events.
Functionality
- Set up in-page content optimizations directly from the Gutenberg editor in either
ExperimentorPersonalizationmode - Split URL testing directly from the Gutenberg editor
- Weighted random targeting for content variants (e.g. 70% variant A, 30% variant B)
- Personalized content bases on:
- URL parameters (including UTM tags)
- localStorage and sessionStorage
- Sends experiment data either directly to the Mixpanel JavaScript SDK or to dataLayer (Tag Manager) when a content optimization is in
Experimentmode
In-Page Optimization Modes
When editors insert a content optimization block, they are asked whether they are creating an Experiment or Personalization. The selected mode can also be changed later in the block settings.
Experimentmode is intended for A/B tests and multivariate tests. It sends experiment events to the configured analytics destination.Personalizationmode is intended for showing targeted content without experiment tracking.- Existing content optimization blocks default to
Experimentmode so existing experiments keep their previous behavior.
Measurement and evaluation of experiments is not part of this plugin.
Experiment mode can be used in conjunction with the Mixpanel experiments feature. Conversion events also need to be set up separately for Mixpanel.
Documentation
- Setup
- Setting up an in-page experiment
- Using split URL tests
- Personalize content
- Evaluating experiments in Mixpanel
- Development
FAQ
Is the plugin compatible with every WordPress website?
So far yes. Although it's developed and tested for Planet4, it can be used in any WordPress installation.
Can the plugin be used with different web analytics software?
You may be able to use Tag Manager to set up the plugin to work with different web analytics solutions if you can make use of dataLayer event. The event contains the variables experiment_name and experiment_variant. Those could be used to build cohorts in some web analytics tools.
I have more questions, an idea for an additional feature or something doesn't work
Please be aware that the plugin is provided as is and our time for support is limited. But please do open an issue on GitHub for any bugs, feature ideas or other requests.