Dynamic Content

Free, or Pro from $4 a month

Shows a different phone number, WhatsApp number or call to action depending on how the visitor arrived, so you can tell which campaign generated the call.

Free version coming to WordPress.org. Pro adds what is listed below, billed once a year at $48 for one site.

Rules, in priority order. Conditions group with AND inside a group and OR between groups, and the first matching rule wins.

Installing Dynamic Content, every setting it has, the screens it adds, and its 18 documented actions and filters. The full reference, including the arguments every hook receives, ships inside the plugin on its Documentation screen and in docs/HOOKS.md, so it can never describe a version you are not running.

What you need

  • WordPress 6.4 or newer
  • PHP 8.0 or newer
  • No other plugin, service or account required

Installing it

  1. The free version is in review for the WordPress.org directory. Once listed, open Plugins → Add New, search for Dynamic Content, install and activate it.
  2. Open its Status screen from the sidebar. It reports what is running, and it is the first place to look if something later seems not to be.
  3. That is the whole installation. Every setting has a working default, so nothing has to be configured before the plugin does its job.

Adding Pro

  1. Keep the free plugin active. Pro extends it rather than replacing it, and WordPress refuses to activate Pro on its own.
  2. Download the Pro zip from your receipt or your order history, then install it through Plugins → Add New → Upload Plugin.
  3. Paste your licence key on the Licence screen and activate it. Updates then arrive in wp-admin like any other plugin.

Where everything is in wp-admin

  1. Slots is every value on the site a rule is allowed to change, each with the default a visitor sees otherwise.
  2. Rules is the ordered list of conditions, first match wins.
  3. Status reports what is live and shows the markup and shortcode for placing a slot.
  4. Settings holds the cookie name, retention, DOM watching and the debug panel.
  5. Documentation is the full reference, bundled with the plugin.

Settings

Every one of these has a default that works. The defaults below are the ones in the code, not a recommendation.

SettingDefaultWhat it does
cookie_namewpdc_contextName of the first party cookie the visitor context is kept in.
retention_days30How long the context that decides which rule matches is remembered. Anywhere from 0 to 365.
watch_domonKeeps watching for content added after the page loaded, so a slot inside a popup or a lazily rendered block is still replaced.
public_debugoffShows the front end debug panel to logged out visitors as well as to administrators.

Actions and filters

Limits, classifications, tracked values and admin screens are all filterable, so extending this plugin does not mean forking it. Names and descriptions below are generated from the source.

ActionWhat it is for
wpdc_import_completedFires after an export file has been imported.
wpdc_loadedFires once every feature has registered its hooks.
wpdc_register_featuresFires before any feature registers its hooks.
wpdc_rules_savedFires after the set of rules has been stored.
wpdc_settings_savedFires after the plugin's settings have been stored.
wpdc_slots_savedFires after the set of slots has been stored.
FilterWhat it is for
wpdc_admin_screensFilters this plugin's admin screens.
wpdc_countriesFilters the countries offered as suggestions on the rules screen.
wpdc_debug_allowedFilters whether the current visitor may open the debug panel.
wpdc_debug_configFilters the debug panel configuration handed to the front end script.
wpdc_device_breakpointsFilters the viewport widths that separate mobile, tablet and desktop.
wpdc_feature_enabledFilters whether a feature is switched on.
wpdc_geo_availableFilters whether a visitor's country and region can be resolved here.
wpdc_geo_configFilters the geo configuration handed to the front end script.
wpdc_migrationsFilters the migration steps.
wpdc_rule_limitFilters how many rules this site may configure.
wpdc_script_configFilters the configuration passed to the front end script.
wpdc_slot_limitFilters how many slots this site may configure.

A worked example

// Raise the free tier's limits, or lower them for an editor you do not trust.
add_filter( 'wpdc_slot_limit', fn( int $limit ): int => 20 );
add_filter( 'wpdc_rule_limit', fn( int $limit ): int => 40 );

// Decide the visitor's country yourself, from a header your CDN sets.
add_filter( 'wpdc_visitor_country', function ( string $country ): string {
	return $_SERVER['HTTP_X_GEO_COUNTRY'] ?? $country;
} );

// React to a configuration import, for example to clear your own cache.
add_action( 'wpdc_import_completed', function ( array $slots, array $rules ): void {
	wp_cache_flush();
}, 10, 2 );

If something is wrong

Check the Status screen, then the debug panel on the front end: between them they name what was captured, what matched and why. If that does not answer it, write to us and say what you expected instead. There is also the product page if you want to see the screens before installing anything.

The other two plugins

Attribution Tracker

Records where every visitor came from and attaches it to the form they submit, so a lead in your inbox arrives with its campaign on it.

Responsive Focal Point

Lets an editor pick the part of an image that must never be cropped out, and set a different point per breakpoint when one is not enough.