Preta

Description

Preta connects your WordPress site to the Preta personalization and targeting platform.

The plugin securely sends selected attributes from the logged-in WordPress user to Preta as a signed context token. Preta can then use those attributes to evaluate campaigns and personalize or target on-page elements for each visitor.

Examples of targetable attributes include:

  • WordPress role
  • Signup month
  • Locale
  • Selected ACF user fields
  • Selected safe user meta fields

The plugin does not require clients to manually create or paste private signing keys. Preta generates a 2048-bit RSA signing key automatically and stores it, authenticated-encrypted, in the WordPress database. Administrators who prefer to manage their own key can instead configure PRETA_PRIVATE_KEY or PRETA_PRIVATE_KEY_PATH in wp-config.php, which the plugin only ever reads.

The private signing key is never sent to Preta.

Configuration

After activation, open:

Preta > Settings

The settings page allows administrators to:

  • Configure the signing key.
  • View the public key.
  • Review key storage and verification status.
  • Discover available user attributes.
  • Select which attributes are sent to Preta.
  • Test the generated user context token.
  • Configure debug logging for troubleshooting.

Only users with the required WordPress administrator capability can access the plugin settings.

Preta Account and Setup

The plugin connects to the Preta service.

A Preta account is required to configure campaigns and targeting.

After installing the plugin:

  1. Generate the WordPress signing key.
  2. Copy the public key from the plugin settings.
  3. Add the public key to your Preta project.
  4. Verify the WordPress integration.
  5. Review the discovered attributes.
  6. Select and save the attributes that should be available for targeting.
  7. Create and configure campaigns in Preta.

For more information about Preta, visit:

https://pretasystems.com/

Attribute Discovery

Preta can discover supported attributes from the WordPress installation.

Supported sources include:

  • WordPress core user information.
  • Active Advanced Custom Fields (ACF) user fields.
  • Safe user meta values.

The discovery process identifies attributes that can safely be represented as scalar targeting values.

Potentially sensitive or unsuitable values are excluded from discovery and transmission.

Discovered attributes are not automatically added to the signed context after discovery. Administrators must review and save the attributes they want the plugin to send.

New attributes discovered later can be reviewed and added without automatically changing the existing saved configuration.

Security and Privacy

The plugin uses RS256 signed context tokens to send selected user attributes to Preta.

The private signing key is generated automatically and stored authenticated-encrypted (AES-256-GCM, with a key derived from this WordPress installation’s own secrets) in a plugin-owned database option. It is never written to a file, never stored in plaintext, and never sent to Preta. Administrators may instead configure PRETA_PRIVATE_KEY or PRETA_PRIVATE_KEY_PATH in wp-config.php to manage the key themselves; the plugin only ever reads these.

The public key can be registered with Preta to verify signatures.

The plugin limits attribute values to supported scalar types and excludes sensitive or unsuitable fields from discovery and transmission.

The plugin does not intentionally send passwords, session tokens, or other sensitive authentication data to Preta.

Only selected attributes are included in the signed user context.

Administrators should review the attributes selected for transmission and ensure that their site’s privacy and data-processing requirements are satisfied.

External Services

This plugin connects to the Preta service operated by Preta Systems.

The service is used to:

  • Verify signed user context.
  • Evaluate targeting rules.
  • Determine which configured campaign experiences apply to a visitor.
  • Deliver the Preta loader used for campaign evaluation and personalization.

When the plugin is configured and active, selected user attributes may be transmitted from the WordPress site to Preta in a signed context token.

Service:

https://pretasystems.com/

Privacy Policy:

https://pretasystems.com/privacy/

Please review the Preta service privacy policy before enabling the integration.

License

This plugin is licensed under the GNU General Public License version 2 or later.

https://www.gnu.org/licenses/gpl-2.0.html

Screenshots

Installation

  1. Install and activate the Preta plugin.
  2. Open the Preta settings page in WordPress administration.
  3. Generate or configure the signing key when prompted.
  4. Copy the displayed public key.
  5. Register the public key in your Preta account.
  6. Discover the available WordPress, ACF, and user-meta attributes.
  7. Select the attributes you want Preta to receive.
  8. Save the selected attributes.
  9. Configure your targeting campaigns in Preta.

After configuration, the plugin loads the Preta loader on the site and provides signed context for logged-in users.

FAQ

Does the plugin send the private signing key to Preta?

No. The private signing key is generated and kept on the WordPress site (encrypted in the database, or in a file you manage yourself via PRETA_PRIVATE_KEY_PATH). Preta receives only the public key, for signature verification.

Can I choose which user attributes are sent?

Yes. The plugin provides attribute discovery and allows administrators to select which supported attributes are included in the signed context.

Does the plugin work with ACF?

Yes. When Advanced Custom Fields is active, supported ACF user fields can be discovered and selected.

Are all user meta fields automatically sent?

No. User meta values are filtered and only suitable attributes are made available for selection.

What happens when a user logs out?

The logged-in user’s signed context is removed and Preta can evaluate the visitor without that authenticated user context.

Does the plugin require a Preta account?

Yes. A Preta account is required to configure targeting campaigns and use the Preta service.

Can I disable debug logging?

Yes. Debug logging can be configured from the Preta settings page.

What happens if I delete the plugin?

Deleting the plugin is permanent. It removes all Preta data, including the automatically-generated private signing key and the plugin settings. This cannot be undone and the private key cannot be recovered. After deletion you would need to reinstall, generate a new signing key, and register its new public key in Preta. A key you manage yourself via PRETA_PRIVATE_KEY_PATH is never touched. Deactivating the plugin (instead of deleting it) is non-destructive and keeps your key and settings.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Preta” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Preta” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

3.2.1

  • Changed automatically-generated signing keys to be stored authenticated-encrypted in the WordPress database instead of the filesystem.
  • Removed the filesystem-based key storage used on some restrictive hosts in earlier versions.
  • Fixed all inline scripts and styles to use the WordPress script/style APIs.
  • Updated diagnostics for the new key-storage architecture.

3.2.0

  • Added automatic user attribute discovery.
  • Added support for discovering supported WordPress, ACF, and user-meta attributes.
  • Added secure signing-key fallback storage for supported hosting environments.
  • Added protected token refresh for logged-in users.
  • Added security validation for user attributes.
  • Improved administrator-only settings access.
  • Improved key storage verification and security checks.
  • Improved WordPress hosting compatibility.
  • Added integration and security regression coverage.