Next-Level Code. Nexuvibe Style ...

Hrs
Min
Sec
WordPress Affiliate Network & Multi-Domain Referral Tracking

User Sync for WordPress Affiliate Networks:
Tracking Referrals Across Domains

An affiliate drives a signup on your main site. The customer converts on your sub-brand site. The referral credit disappears into the gap between two disconnected WordPress databases. This guide covers the full architecture for affiliate user tracking across multi-domain WordPress networks — so every referral gets attributed correctly, every time.

13 min read
Updated 2026
Affiliate Network Architecture Guide
User sync for WordPress affiliate networks tracking referrals across domains – how to keep affiliate attribution accurate across multi-domain WordPress installations 2026

Affiliate networks built on WordPress are particularly vulnerable to a referral attribution failure that most network operators discover only when affiliates start complaining about missing commissions. The failure has a consistent pattern: an affiliate recruits a user who registers on the main site. The user later converts — makes a purchase, upgrades to a paid plan, or completes a high-value action — on a connected sub-domain, regional site, or sister brand. The conversion happens, the revenue lands, but the affiliate commission does not fire because the conversion event occurred on a different domain than the one where the referral was originally tracked.

This is the cross-domain referral attribution problem, and it sits at the intersection of two technical systems that were not designed to talk to each other by default: the affiliate tracking system that lives on one WordPress installation, and the conversion events that occur on another. Solving it requires understanding both the user identity layer (the sync problem) and the referral attribution layer (the tracking problem) and how they interact in a multi-domain affiliate network architecture.

This guide covers the full picture: how affiliate plugins store referral data in WordPress, the specific ways cross-domain networks break attribution, the user sync architecture that preserves affiliate identity across domains, and how WordPress affiliate network cross-domain user sync provides the identity layer that referral tracking depends on. We reference AffiliateWP — the most widely deployed WordPress affiliate plugin — throughout, with notes on how the same principles apply to other affiliate platforms.

This guide is written for affiliate network operators and WordPress developers who build and maintain multi-domain affiliate programs. It assumes familiarity with how affiliate programs work generally but covers the WordPress-specific technical details that make cross-domain attribution a distinct architectural challenge.

What this guide covers
How AffiliateWP and other affiliate plugins store referral attribution in WordPress user meta.
The four specific ways cross-domain networks break affiliate attribution.
Why user identity continuity is the prerequisite for cross-domain referral tracking.
The affiliate-specific user meta fields that must be synced alongside core user data.
How to architect a multi-domain affiliate network so attribution never falls through the cracks.
Affiliate-as-user sync: keeping affiliate accounts consistent when affiliates are also customers.

How affiliate plugins store referral data in WordPress: what you need to know

Affiliate attribution in WordPress exists at two levels: the referral link level (cookie-based tracking that connects a visitor’s session to an affiliate’s ID) and the conversion level (a database record that connects a completed action to the referral that preceded it). The cross-domain attribution problem primarily affects the second level — the point where a conversion event occurs and the affiliate credit needs to be assigned.

Understanding how AffiliateWP specifically stores this data illuminates exactly where the attribution breaks in a multi-domain setup.

AffiliateWP referral storage architecture

AffiliateWP stores its data in custom tables: wp_affiliate_wp_affiliates (affiliate accounts), wp_affiliate_wp_referrals (conversion records), wp_affiliate_wp_visits (click tracking), and wp_affiliate_wp_payouts (commission payments). Each affiliate account is linked to a WordPress user via user_id. Each referral record stores the affiliate_id, the reference (the order ID or user ID being attributed), the commission amount, and the status.

The cross-domain attribution gap
All of AffiliateWP’s tables exist on a single WordPress installation. When a conversion happens on a different WordPress installation — a different domain — that installation has no AffiliateWP tables, no affiliate data, and no mechanism to fire a commission for the originating affiliate. The referral cookie may have tracked the visitor to the conversion domain, but without a corresponding AffiliateWP installation or a cross-domain attribution mechanism, the commission never fires.

The referral cookie and its domain limitation

AffiliateWP sets a cookie (affwp_ref) on the visitor’s browser when they arrive via an affiliate link. This cookie stores the affiliate’s ID and is read by the conversion integration at the moment of purchase or signup. The cookie is set for the domain it originates from. If the affiliate link points to brand.com but the user converts on shop.brand.com or store.anotherbrand.com, the cookie behavior depends on the domain relationship.

Subdomain vs. separate domain behavior
Cookies set with a leading dot (e.g., .brand.com) are accessible across all subdomains of that domain, including shop.brand.com. AffiliateWP supports this via the affwp_cookie_domain filter. However, cookies cannot cross to entirely different domains (anotherbrand.com). For fully separate domain networks, cookie-based tracking breaks entirely at the domain boundary, and a different attribution mechanism is needed.

The referred-by user meta field: the identity-based attribution layer

AffiliateWP stores a user meta key affwp_referral_affiliate on the referred user’s WordPress account at the moment of their registration. This meta key stores the ID of the affiliate who referred them. This is the identity-based attribution record — separate from the cookie-based session tracking, it provides a permanent link between the registered user and the affiliate who recruited them.

🔗Implementing WooCommerce sub-affiliate commission tracking ensures parent affiliates receive credit for conversions driven by their recruited sub-affiliates across multi-domain networks. →

Why this meta field is the key to cross-domain attribution
If this meta field is synced with the user record from the primary site to all connected sub-sites, any conversion that occurs on any connected site can query the converted user’s affwp_referral_affiliate meta to identify the originating affiliate — even when the cookie has expired, even when the conversion happens months after the original referral, and even when the conversion occurs on a completely different domain.

The four ways cross-domain networks break affiliate attribution

Attribution failures in multi-domain WordPress affiliate networks are not random. They cluster around four specific patterns that each have a different technical cause and a different fix. Identifying which pattern is producing the missing commissions in your network is the first step toward resolving them.

F1
The referral cookie does not cross to the conversion domain
Affects: separate domain networks — not subdomain networks

An affiliate link drives a visitor to mainbrand.com. The affwp_ref cookie is set on mainbrand.com. The visitor browses products, decides to purchase on storebrand.com where the products are actually sold. The conversion fires on storebrand.com, which has no access to the cookie set on mainbrand.com. No commission fires.

Resolution
Pass the affiliate reference parameter (?ref=affiliateID) in the URL when the user crosses domain boundaries. AffiliateWP reads the ref query parameter on landing and sets its cookie on the new domain. The user identity sync (described below) provides a durable identity-based fallback that does not depend on the URL parameter surviving the cross-domain journey.

F2
The referred user is not recognized on the conversion domain
Affects: networks without user sync — referral meta cannot be read

A user registers on the main site via an affiliate link. Their account on the main site has the affwp_referral_affiliate meta correctly set. They later purchase on the conversion domain. But their account was never synced to the conversion domain — they create a new account there, which has no referral meta. Even if a conversion hook on the conversion domain looked for the referral meta, it would find nothing because this account was created independently.

Resolution
This is the user sync problem. The referred user’s account, including their affwp_referral_affiliate meta, must be synced to all conversion domains at the moment of registration on the primary site. With user sync in place and SSO enabling single-account access across domains, the user never creates a duplicate account — they arrive authenticated on the conversion domain and their referral attribution travels with them.

F3
AffiliateWP is only installed on the primary site — the conversion domain has no affiliate system
Affects: networks where affiliate infrastructure is centralized

The affiliate network is managed entirely from the primary site. AffiliateWP is installed and configured there, with all affiliate accounts, referral records, and payout management centralized. The conversion domain is a WooCommerce store or other site that does not have AffiliateWP installed. When a purchase happens on the conversion domain, there is no local AffiliateWP instance to fire the referral — and the primary site’s AffiliateWP has no visibility into purchases on the conversion domain unless a notification mechanism bridges the two.

Resolution
Two approaches: install AffiliateWP on the conversion domain as well (pointing to the primary site’s database for affiliate data via the AffiliateWP REST API integration), or implement a webhook from the conversion domain that fires on purchase completion and creates a referral record on the primary site’s AffiliateWP installation. Both require the user identity to be linked across domains — the referral can only be attributed if the purchasing user’s identity on the conversion domain maps back to the user with the referral meta on the primary site.

F4
The affiliate themselves has inconsistent account status across domains
Affects: networks where affiliates are also customers or members

In many affiliate networks, the affiliates are also active users of the product — they are customers, members, or creators who receive special affiliate access in addition to their regular account. When an affiliate’s account is suspended, their email is changed, or their payout details are updated on the primary site, those changes need to propagate to every connected domain where their account exists. An affiliate who cannot log in to a connected site to access their affiliate dashboard, check their referral stats, or withdraw earnings will escalate the issue immediately.

Resolution
Affiliates are users. Their accounts must be part of the standard user sync workflow. The affiliate-specific user meta (affwp_affiliate_id, affiliate status flags) must be included in the metadata sync scope so that their affiliate identity is preserved across all connected domains. SSO ensures they can access their affiliate dashboard on any connected site without re-authenticating.

User identity continuity: the prerequisite for cross-domain attribution

Every attribution failure described above ultimately traces back to one root condition: the absence of a reliable, consistent user identity that follows the referred user across domain boundaries. Cookie-based attribution is inherently fragile in multi-domain environments — cookies expire, browsers block third-party cookies, and users clear their browser data. These are session-level mechanisms. What affiliate networks need is an account-level mechanism: a permanent link between the referred user and the affiliate who recruited them that travels with the user’s WordPress account wherever that account is recognized.

User sync provides this mechanism. When the referred user’s account is synced from the primary site to all connected conversion domains — including the affwp_referral_affiliate meta field that records their referral attribution — that attribution becomes a permanent property of their identity on every site in the network. No matter which domain they convert on, no matter how long after the original referral, the attribution record is present and readable by the conversion event handler.

🔗Implementing WooCommerce regional store single sign-on integration ensures seamless affiliate tracking across domains while maintaining consistent user identity. →

How SSO completes the attribution picture
SSO solves a second attribution problem that user sync alone does not address: duplicate account creation. Without SSO, a referred user who arrives on a conversion domain and does not recognize the login page may create a new account with the same email address — or a different one. That new account has no referral meta because it was not created via the original referral path. With SSO in place, the user arrives on the conversion domain already authenticated — they cannot accidentally create a duplicate account because they are already logged in as the same user whose account carries the referral attribution.
Real-time user synchronization across WordPress affiliate network domains showing referral attribution meta traveling with user account to all connected conversion sites
Real-time sync in Nexu User Sync – WordPress affiliate network cross-domain user identity sync for referral attribution continuity — referred users arrive on every conversion domain with their referral attribution meta intact.

The affiliate-specific user meta fields that must be synced

Standard user sync covers the core identity fields. For an affiliate network, several additional user meta fields must be included in the sync scope to ensure that both referral attribution and affiliate account functionality work correctly across all connected domains.

AffiliateWP user meta key
What it stores
Sync?

affwp_referral_affiliate
ID of the affiliate who referred this user at registration
Yes

affwp_referral_url
The URL via which the user was referred — stored for attribution context
Yes

affwp_affiliate_id
Affiliate’s own ID — present on users who are affiliates themselves
Yes

affwp_promotion_method
How the affiliate promotes (stored on affiliate user accounts)
Yes

affwp_earnings (per affiliate)
Cached lifetime earnings total for the affiliate
No

affwp_referral_count
Cached referral count — site-specific stat
No

The fields marked “No” are site-specific cached statistics. Syncing them would create misleading data on sub-sites — an affiliate who has referred 200 users on the primary site but has never referred anyone from a specific conversion sub-site would show 200 referrals on that sub-site, which is inaccurate from that site’s perspective. These stats should always be computed from the local site’s data, not inherited from another site via sync.

WordPress sync settings panel showing affiliate user meta configuration with affwp referral fields enabled and site-specific stat fields excluded from sync scope
Sync configuration in Nexu User Sync – WordPress affiliate network user meta sync for cross-domain referral attribution continuity — include affiliate attribution meta fields in sync scope while excluding site-specific cached statistics.

Architecting a multi-domain affiliate network for attribution accuracy

The technical fixes described above — syncing referral meta fields, passing the ref parameter across domain boundaries, configuring SSO to prevent duplicate accounts — each address a specific failure mode. Combining them into a coherent architecture produces a multi-domain affiliate network where attribution failures are structurally prevented rather than individually patched.

1
Centralize affiliate program management on one primary site

AffiliateWP runs on a single primary site — the affiliate registration hub, dashboard, and payout management are all here. All affiliate accounts exist as WordPress users on this site. All commission records are stored here. Sub-sites in the network are conversion endpoints that report back to this primary site’s affiliate system when conversions occur there.

2
Sync all referred users from primary to all conversion sub-sites, including referral meta

Every user who registers on the primary site — whether they were referred by an affiliate or not — is synced to all connected conversion sub-sites. The sync includes the affwp_referral_affiliate and affwp_referral_url fields. This means that every user who arrives on a conversion sub-site carries their referral attribution with them in their account.

3
Enable SSO from primary to all conversion sub-sites

SSO prevents the duplicate account problem that defeats referral attribution. When a referred user navigates to a conversion sub-site, SSO authenticates them automatically. They arrive as the same user whose account carries the referral meta — not as a new user with a clean, unattributed account. The conversion event handler on the sub-site can query the authenticated user’s referral meta and fire the commission correctly.

4
Configure conversion sub-sites to report commissions back to the primary site’s affiliate system

When a purchase occurs on a conversion sub-site, a webhook or API call fires to the primary site’s AffiliateWP installation, passing the user ID (or their referral meta value), the order value, and the conversion type. AffiliateWP on the primary site creates the referral record against the affiliate identified by the user’s affwp_referral_affiliate meta. The commission fires. The affiliate’s dashboard on the primary site reflects the cross-domain conversion.

🔗Implementing WooCommerce regional store single sign-on integration ensures seamless affiliate tracking across domains while maintaining consistent user sessions. →

5
Pass the ref parameter in cross-domain navigation links as a belt-and-suspenders measure

For visitors who arrive via affiliate links but have not yet registered (and therefore have no user account to carry the attribution meta), the referral cookie remains the attribution mechanism. Configure cross-domain navigation links from the primary site to conversion sub-sites to append the active referral parameter from AffiliateWP’s cookie so it is available to the receiving site’s AffiliateWP instance. This covers pre-registration visitors who convert without creating an account first — for example, guest checkouts.

Keeping affiliate accounts current across the network

Affiliate accounts require the same ongoing sync attention as regular customer accounts — arguably more, because the consequences of an out-of-sync affiliate account are visible to people who have a direct financial relationship with your platform and are accustomed to scrutinizing their account details.

Affiliate lifecycle event → required sync action

Affiliate changes their email
Email update propagates to all connected sites immediately. Their login identifier is consistent across all domains in the network.

Affiliate changes their password
Password hash propagates to all connected sites. SSO means the password is rarely needed on sub-sites, but it must match if ever used directly.

Affiliate account is suspended on primary site
Account deactivation or role change propagates to all sub-sites. A suspended affiliate cannot access their dashboard on any connected domain.

New affiliate registers on primary site
Account created on all connected sub-sites within seconds of registration. Affiliate meta including affwp_affiliate_id synced immediately.

Affiliate profile updated (name, promo method)
Profile changes propagate to all sub-sites. Affiliate-facing pages on sub-sites display current profile information.

WordPress affiliate network dashboard showing all connected conversion sites with affiliate user sync health status and cross-domain attribution infrastructure
Network dashboard in Nexu User Sync – WordPress affiliate network multi-domain user sync and attribution infrastructure monitoring — confirm all conversion sites are receiving referral attribution meta and processing affiliate user updates correctly.

Configuration checklist: setting up user sync for a WordPress affiliate network

The following checklist covers every configuration step specific to affiliate network user sync deployments. It builds on the standard multi-site sync setup and adds the affiliate-specific items that most general setup guides omit.

Configuration item

Add affiliate referral meta to sync scope: In your sync plugin’s metadata configuration, explicitly include affwp_referral_affiliate, affwp_referral_url, and affwp_affiliate_id. These fields are not part of WooCommerce metadata sync — they require explicit inclusion in the general metadata sync scope.

Exclude cached stats from sync: Explicitly exclude affwp_earnings and affwp_referral_count from sync to prevent misleading stats on sub-sites.

Enable SSO from primary to all conversion sub-sites: Configure SSO so referred users and affiliates can access all connected domains without re-authenticating. Test the SSO flow with a test affiliate account and a test referred user account before going live.

Configure cross-domain link ref parameter passing: For links from the primary site to conversion sub-sites, configure them to append the active AffiliateWP referral parameter when a referral cookie is present. This covers pre-registration visitors who convert via guest checkout.

Configure sub-site conversion events to report to primary AffiliateWP: Implement the webhook or AffiliateWP REST API call on each conversion sub-site that fires on purchase completion and creates a referral record on the primary site’s affiliate system. Test each integration with a real purchase on each sub-site before launch.

Run a Bulk Push after initial setup: Ensure all existing users on the primary site — including their referral meta — are synced to all connected sub-sites before enabling live cross-domain traffic. Any user who registered before sync was configured will not have their referral meta on sub-sites until the Bulk Push delivers it.

Test attribution end-to-end before promoting to affiliates: Using a test affiliate account and a test referred user account, complete the full referral journey: affiliate link → primary site registration → cross-domain navigation → sub-site conversion → verify commission fires on primary site AffiliateWP. Only promote the cross-domain attribution capability to affiliates after this test passes completely.

Affiliate programs run on trust. An affiliate who drives referrals that convert but do not generate commissions will not wait long before leaving your program and telling others why. The technical architecture described in this guide — user sync carrying referral attribution meta, SSO preventing duplicate accounts, and conversion event reporting bridging the gap between domains — is what converts a leaky multi-domain attribution setup into one that affiliates can rely on.

Nexu User Sync’s WordPress affiliate network cross-domain user and referral meta synchronization provides the identity layer that affiliate attribution depends on — syncing referral meta fields alongside core user data, enabling SSO to prevent duplicate accounts, and maintaining affiliate accounts consistently across every domain in your network.

Referral Meta Sync · SSO Duplicate Prevention · Affiliate Account Continuity · Cross-Domain Attribution

Every referral attributed. Every commission fired. No matter which domain the conversion happens on.

Nexu User Sync gives your affiliate network the identity layer it needs — syncing referral attribution meta across all connected domains, preventing duplicate accounts with SSO, and keeping affiliate accounts consistent everywhere they are recognized.

Nexu User Sync – WordPress affiliate network cross-domain referral attribution and user sync plugin

Nexu User Sync by NEXU WP
WordPress plugin · Referral Meta Sync · SSO · Affiliate Account Continuity · Cross-Domain


Get Nexu User Sync

🔗Implementing WooCommerce affiliate order attribution tracking ensures commissions are accurately assigned even when conversions occur across multiple domains. →

Picture of Mahdi Jabinpour

Mahdi Jabinpour

As a sales-driven developer and the founder of NexuWP, Mahdi focuses on building WordPress solutions that don't just work—they convert. From AI-powered bulk translation engines to high-efficiency media offloading, he helps business owners automate the "grind" so they can focus on global growth. He is a pioneer in integrating advanced LLMs into the WordPress workflow.

RELATED POSTS

RELATED POSTS

4 Reviews
Mark Thompson 3 months ago

The affwp_cookie_domain filter is a decent workaround, but it doesn't fully solve the core issue. when users jump between domains, the cookie still drops off unless you manually sync user meta across sites. Had to write custom scripts to push the affwp_affiliate_id meta key between databases shouldn't need to do that for a premium solution. works, but feels like a half fix.

Richard Moore 3 months ago

So if a referral record shows the affiliate ID, order ID, commission, and status, does that mean I

Mahdi Jabinpour 3 months ago

Your records show the referral was tracked properly.

Patricia Johnson 3 months ago

Got cross domain referrals working no more manual spreadsheets!

James Davis 3 months ago

Hey, just wanted to say this solved our cross domain tracking nightmare. had affiliates losing credits left and right when users jumped between our main site and sub brands. Now every referral sticks where it should

Please log in to leave a review.