Docs
Guides Developers Connect WordPress and WooCommerce

Connect WordPress and WooCommerce

The RadarSend plugin connects your WordPress site to your RadarSend account. Once it’s connected, it:

  • adds the RadarSend tracking code to every page, so the pages people read show on their contact;
  • places the forms you build in RadarSend on your pages, with a block or a shortcode;
  • adds people who register on your site as contacts, and records their sign-ups and logins;
  • keeps the same contact when someone changes their email address in WordPress.

With WooCommerce, it also records each order on the customer’s contact, with the products in it. With WooCommerce Subscriptions, it records renewals, cancellations and the rest of a subscription’s life too. These are activities, so you can:

  • Start an Automation or a sequence when someone buys, renews or cancels.
  • Score them like any other activity.
  • Build a segment of everyone who bought, or who canceled.

Before you begin#

  • You need to be an administrator of the WordPress site.
  • You need a RadarSend login for the account you’re connecting.
  • For tracking, your RadarSend account needs a tracking domain that’s live. The plugin gets the tracking code from it.
  • The plugin needs WordPress 6.5 or later and PHP 7.4 or later. WooCommerce and WooCommerce Subscriptions are optional.

Install the plugin#

The plugin is free in the WordPress plugin directory, as RadarSend.

  1. In WordPress, go to Plugins→Add New Plugin.
  2. Search for RadarSend.
  3. Click Install Now, then Activate.

The RadarSend Setup wizard opens.

Connect your RadarSend account#

There’s no API key to copy. You connect by signing in to RadarSend.

  1. In the wizard, click Connect to RadarSend. If you skipped the wizard, go to RadarSend in the WordPress admin menu and click Connect to RadarSend under Overview→Connection.
  2. A RadarSend page opens. Sign in if you aren’t already.
  3. Choose the RadarSend account this site connects to, and click Allow access.

You come back to WordPress, connected. The plugin reads your tracking code and your forms from RadarSend, so there’s nothing to paste into your theme.

The wizard then asks two more things. You can change both later.

  • Tracking script: whether to add the tracking code to your site, and where it’s served from. See Website tracking.
  • Lifecycle stages: the stage new contacts get, and with WooCommerce, the stage for each kind of customer. See Lifecycle stages.

A site connects to one RadarSend account. In RadarSend, the WordPress and WooCommerce card on Settings→Integrations shows the connection, and Manage in Connections opens it.

Website tracking#

The plugin adds RadarSend’s tracking code to every page of your site. Visits then show on each contact once RadarSend knows who they are, as described in Add tracking to your website.

It also tells RadarSend who’s visiting:

  • A logged-in user is identified on the first page of each login, so the pages they read are on their contact.
  • A guest who checks out is identified on the order confirmation page.

To change it, go to RadarSend→Overview→Tracking in WordPress:

  • Inject tracking script on all front-end pages turns the tracking code on or off. Off, the plugin loads no script and sends nothing from your visitors’ browsers.
  • Served by your website loads the script from your own site’s address. It’s offered when your site runs the RadarSend worker, and it can keep cookies longer in some browsers. Served from your tracking subdomain works everywhere.
  • Refresh from RadarSend reads the tracking settings and your form list again, after you change them in RadarSend.

If your site and your tracking domain are on different domains, the panel says Visitor sessions won’t carry across pages on this site. Use a tracking domain on your site’s own domain.

Note

The plugin adds the standard tracking code, not the consent-aware code. If your site needs visitors to accept analytics first, turn off Inject tracking script on all front-end pages, and add the consent-aware code yourself as described in Ask for consent before tracking. The add-to-cart events and the identifying of logged-in users described here need the plugin’s script, so they stop when it’s off.

Place a form#

Build the form in RadarSend first. See Create and embed a form. Then, in WordPress:

  • In the block editor, add the RadarSend Form block and choose the form.
  • Anywhere else, paste its shortcode, such as [radarsend_form slug="newsletter"]. RadarSend→Tools→Forms lists every form with its shortcode to copy.

The form’s fields, consent options and confirmation email come from RadarSend. Submissions go straight from the visitor’s browser to RadarSend, so they’re added as contacts and start whatever the form starts, as they would from any other page.

If the form limits where it can be submitted from, under Accept submissions from, add your site there. The plugin marks a form it can’t submit to as origin not allowed.

Contacts from WordPress#

When someone registers on your site, the plugin adds them as a contact, with their name and email, and records a Signup. Each time they log in, it records a Login.

To add the users you already have, go to RadarSend→Tools→Sync users, pick the Roles to include and, if you like, a Stage for the new contacts, and click Sync users. Existing contacts keep their stage. Running it again never creates duplicates.

When someone changes their email#

The plugin keeps a link between each WordPress user and their contact. When a user changes their email address in WordPress, RadarSend moves the same contact to the new address, with its history. See Contacts.

Under RadarSend→Overview→Contacts, choose what happens if the old address had unsubscribed:

  • Start fresh, the default: the new address can be emailed.
  • Keep unsubscribes: the new address stays unsubscribed. Choose this if your audience needs stricter consent, for example under CASL or GDPR.

Bounces and spam complaints stay with the old address either way.

If another contact already has the new address, the plugin doesn’t guess which to keep. It lists the pair under RadarSend→Tools→Debug log, in Contacts needing a merge, for you to merge in RadarSend.

WooCommerce orders#

With WooCommerce, these appear on the customer’s activity in RadarSend:

ActivityWhen
PurchaseAn order reaches Completed in WooCommerce. The activity lists the products and the total.
RefundAll or part of an order is refunded.
Add to cartA visitor adds a product to the cart. Recorded by the tracking code, so it needs tracking on.

With WooCommerce Subscriptions, these are recorded too:

ActivityWhen
PurchaseA subscription becomes active.
RenewalA renewal payment goes through.
Payment failureA renewal payment fails.
Cancel pendingA subscription is set to end at the close of its current period.
ReactivationA subscription that was set to end is active again.
CancellationA subscription is canceled.
ExpiredA subscription reaches its end date.

A registered customer’s orders always go to the contact for their WordPress account email, even when they checked out with a different billing email. The billing email is kept on the contact, in a billing_email field. A guest’s contact is their billing email.

The plugin also fills in the customer’s name, phone, company and address from their billing details.

Use these activities as a trigger, a wait-for step or a scored activity, under Settings→Contacts & scoring→Activities. They don’t fill the Commerce card, the Purchases tab or the Ecommerce segment filters, which come from Stripe.

Order fields#

Under RadarSend→WooCommerce→Field mapping, choose which order and subscription details to copy onto the contact, such as lifetime value, order count, first and last order date, last order total, subscription status and next payment date. For each one, pick a RadarSend field, or Custom to create one. The fields are created in RadarSend the first time you save. They’re ordinary custom fields, so you can segment on them and use them in merge tags.

Tags from products#

Under RadarSend→WooCommerce→Tagging rules:

  • Simple Tagging tags each customer with the SKU or the slug of the products they buy.
  • Advanced Rules match products by category or SKU pattern (such as PRO-*), and add the tags you choose.

Lifecycle stages#

Under RadarSend→WooCommerce→Lifecycle stages, pick a RadarSend stage for each of these, or leave it on — None —:

SettingWho gets it
Prospect StageNew contacts from sign-ups and user syncs. Existing contacts keep theirs.
Customer StageA customer who completes a one-off order, unless they hold an active subscription.
Active Subscriber StageA customer whose subscription is active.
Pending Cancellation StageA customer whose subscription is set to end.
Failed Renewal StageA customer whose renewal payment failed.
Cancelled StageA customer whose subscription was canceled.

The subscription stages need WooCommerce Subscriptions. A customer with another active subscription isn’t moved down when one of them is canceled or fails.

Subscription types#

With WooCommerce Subscriptions, RadarSend→WooCommerce→Subscriptions lets you group subscription products into types, matched by category or SKU pattern, such as “premium”. Each contact gets an active_subscriptions field listing the types they hold right now, so you can segment on what someone subscribes to.

To set it for the subscribers you already have, click Sync All Subscribers. For a first import, run Sync users first, then this.

Disconnect#

From WordPress, go to RadarSend→Overview→Connection and click Disconnect. This also removes the site’s access in RadarSend.

From RadarSend, go to Settings→Developer→Connections, open the WordPress connection, and click Disconnect. The site loses access straight away.

Either way, nothing new arrives from the site. What’s already on your contacts stays.

Common issues#

  • WordPress says “This site has lost its connection and is not syncing”. The connection was removed in RadarSend, or its access ran out. Click Connect to RadarSend under RadarSend→Overview→Connection to connect again.
  • “RadarSend needs to reconnect before this site can show forms”. The site was connected before the plugin could show forms. Disconnect and connect again to give it access to them. Syncing carries on meanwhile.
  • A form shows “origin not allowed”. The form only accepts submissions from the sites under Accept submissions from. Add your site’s address there in RadarSend.
  • A new form isn’t in the list. Click Refresh from RadarSend under RadarSend→Overview→Tracking.
  • An order isn’t on the contact. A purchase is recorded when the order reaches Completed. Orders waiting in Processing or On hold don’t count yet.
  • “This stage no longer exists in RadarSend”. A stage the plugin uses was deleted. Pick another under Lifecycle stages. Syncs that use it fail until you do.
  • Tracking shows Not configured. Your RadarSend account has no live tracking domain yet. Set one up, then click Refresh from RadarSend.
  • Something else isn’t syncing. Turn on Enable debug logging under RadarSend→Tools→Debug log to see the plugin’s last 50 calls to RadarSend and what each one returned. RadarSend→Tools→Testing sends a test contact and events.

Good to know#

  • Nothing is sent before you connect. The plugin makes no requests to RadarSend until an administrator connects it.
  • It never slows a page or a checkout. Contacts and events are sent in the background, and a problem with RadarSend can’t break an order or a renewal.
  • Past orders aren’t imported. The plugin records orders from the time it’s connected. Sync All Subscribers sets subscribers’ types and stages, but adds no past orders.
  • Developers can change what’s sent with three filters: radarsend_contact_data, radarsend_event_properties and radarsend_external_id.