Documentation · Prynt Reveal · Install

WordPress with WPCode

The no-code way for WordPress: the free WPCode plugin prints the snippet in the header of every page, survives theme updates and lets you identify logged-in users with a small PHP snippet.

  1. In WordPress go to **Plugins → Add New**, search for **WPCode** (formerly *Insert Headers and Footers*), install and activate it.
  2. Copy the snippet from the Prynt console (**Reveal → Websites → your site → Install**).
  3. Go to **Code Snippets → Header & Footer**, paste it in the **Header** box and press **Save Changes**.
<script src="https://api.pryntid.com/cdn/prynt-reveal.umd.js" async
  onload="PryntReveal.reveal({publicKey:'pk_live_YOUR_PUBLIC_KEY',website:'example.com'})"></script>

Prefer one snippet per feature? Use **Code Snippets → + Add Snippet → Add Your Custom Code**, code type **HTML Snippet**, insertion **Auto Insert**, location **Site Wide Header**, then **Activate**.

2. Check it

Open your site with ?prynt_debug=1 (logged out, in a private window, so caching plugins serve the real page) and confirm loaded: true and lastSend.status: 202. Then run **Websites → Test Script** in the console.

3. Identify logged-in users (optional)

WooCommerce customers, members and LMS students are already your first-party users. Replace the header snippet with a WPCode snippet of type **PHP Snippet**, insertion **Auto Insert**, location **Run Everywhere** (it prints the same tag and adds identify() for logged-in users):

<?php
// WPCode → + Add Snippet → PHP Snippet → Auto Insert → Run Everywhere.
// REPLACES the header HTML snippet: prints the same tag, plus identify() for logged-in users.
add_action('wp_head', function () {
  if (is_admin()) return;
  $after = '';
  if (is_user_logged_in()) {
    $u = wp_get_current_user();
    $after = 'c.identify({email:' . wp_json_encode($u->user_email) . ',name:' . wp_json_encode($u->display_name) . '});';
  }
  echo '<script src="https://api.pryntid.com/cdn/prynt-reveal.umd.js" async onload="'
     . esc_attr("var c=PryntReveal.reveal({publicKey:'pk_live_YOUR_PUBLIC_KEY',website:'example.com'});" . $after)
     . '"></script>';
}, 5);

The email is sent only once consent is known (held until then), from the visitor's own logged-in session on your site, and is stored as a first-party identity with that evidence.

4. Forms

WPForms, Contact Form 7, Gravity Forms, Formidable and Elementor forms render plain HTML forms: add forms: true to the options in the header snippet (or a CSS selector such as forms: ['#wpforms-form-12']) and Reveal reads the email field on submit, only with consent.

<script src="https://api.pryntid.com/cdn/prynt-reveal.umd.js" async
  onload="PryntReveal.reveal({publicKey:'pk_live_YOUR_PUBLIC_KEY',website:'example.com',forms:true})"></script>

Notes

  • WP Rocket, LiteSpeed Cache, Perfmatters and Autoptimize: exclude prynt-reveal.umd.js from *Delay JavaScript execution*, otherwise the first pageview waits for a click or scroll.
  • Consent: CookieYes, Cookiebot, Complianz (via Google Consent Mode) and Klaro are detected automatically — see Consent.
  • WPCode's conditional logic (Pro) can limit the snippet to some pages; Reveal's own URL rules in the console do the same without a plugin licence.
  • Multisite: verify each domain in the console and paste the snippet with that site's domain in each sub-site.

Run the Test Script

  1. In the console go to Websites → your site → **Test Script**. It fetches your page from our side and runs the seven checks: snippet present, public key, website match, CSP script-src, CSP connect-src, consent manager, script position and www redirect.
  2. Open your site with ?prynt_debug=1 to see the live panel from the browser's point of view (consent, CMP, storage, cspBlocked, last send).
  3. Visit two or three pages. The pulse in the console shows the last event within seconds; the first companies appear as soon as a business network visits.

A cspBlocked: true or a failed CSP check means your Content-Security-Policy needs the two lines from CSP and storage. Running a consent manager? Consent explains what is detected and what is sent before the visitor decides.

Last updated 2026-11-03 · Limits · Visitor opt-out