Install Personizely on WordPress and WooCommerce
To install Personizely on a WordPress or WooCommerce site, install the Personizely plugin from the WordPress plugin directory and connect it to your account. The plugin adds the snippet to the <head> of every front-end page. You can also paste the script tag into your theme instead; both give the same result.
Available on: WordPress 3.1 or later, including WooCommerce stores.
Install the plugin
- In WordPress admin, go to Plugins → Add New, search for Personizely and click Install Now, then Activate.
- Open Personizely in the admin menu.
- Click Create an Account and Connect if you're new, or Connect an Existing Account if you already use Personizely.
- Sign in and confirm. You're sent back to WordPress, where the page reads "The plugin is connected to your Personizely account. You're all set."
Connect with a website key instead
If the connect flow doesn't suit you (for example, the WordPress site uses a different domain than the one in Personizely):
- In Personizely, open Settings → Website and copy your website key: the part of the snippet URL between https://static.personizely.net/ and .js.
- In WordPress, open Personizely, click Toggle Advanced Settings, paste it into API Key and click Save Changes.
Plugin settings
Option | What it does | Default |
|---|---|---|
API Key | The website key the plugin loads the snippet for | Set by the connect flow |
Async | Adds the async attribute to the script tag | On |
The plugin's Async checkbox controls loading on WordPress. The Asynchronous script loading setting in Personizely doesn't change it. If you run content A/B tests, turn Async off to prevent flicker. See Performance and flicker.
Install without the plugin
Copy the snippet from Settings → Website in Personizely and paste it just before </head> in your theme, with a header-scripts plugin, or with your theme's custom code setting. See Install with a script tag or Google Tag Manager. Don't use the plugin and a manual tag at the same time.
Caching and optimization plugins
Optimization plugins that combine, delay or defer JavaScript can stop the snippet from running early, or at all. The Personizely plugin automatically excludes the snippet from:
- SiteGround Optimizer (JavaScript combining)
- WP Rocket (JavaScript minification)
- Jetpack Boost (render-blocking JavaScript)
- WP Meteor
With any other optimization plugin, or if you install the script tag manually, exclude static.personizely.net from combining, minifying, delaying and deferring.
Embedding widgets in content
The plugin adds two shortcodes for Embedded widgets and placeholders:
[ply-widget WIDGET_ID]
[ply-placeholder PLACEHOLDER_ID]WooCommerce purchases and cart events
WordPress and WooCommerce don't have a native Personizely store connection. To track purchases, add to cart and checkout starts, either:
- turn on the Google Analytics 4 and GTM. If your site pushes GA4 ecommerce events (purchase, begin_checkout, add_to_cart) to the dataLayer, Personizely records them as its own purchase, checkout start and add to cart events; or
- send events yourself with the JavaScript API (window.ply).
See Goals.
Verify it works
- Open your site's front end in a normal browser window. The snippet isn't loaded in WordPress admin or on the login page.
- Open the developer console. You should see Personizely initialized. Startup time: <n>ms.
- View the page source and check that static.personizely.net appears once, in the <head>.
- In Personizely, click Check code in Settings → Website.
Troubleshooting
- Snippet missing from the page source → the plugin isn't connected (the Personizely admin page shows the connect buttons), or a full-page cache is serving old HTML. Clear the cache.
- Snippet present but nothing in the console → an optimization plugin is delaying or blocking it. Exclude static.personizely.net as described above.
- Widgets and campaigns appear late → Async is on, or an optimization plugin defers the script.