Table of contents :

“You May Also Like” Should Actually Know You

100-days-of-woocommerce-conversion-rate-automation-with-wpsolr-035

Table of contents :

Generic related-product carousels are easy to add and easy for shoppers to ignore. A shopper viewing running shoes should not receive a random selection of products from the same catalog. The recommendation should reflect what they searched for, what they have already viewed, what is compatible with the current product, and what they are likely to buy next.

For a WooCommerce agency, the opportunity is to turn the related-products module into a small, measurable decision system. WPSOLR can provide the indexed product attributes and search context needed to make that system more relevant, while WooCommerce supplies cart, order, stock, price, and purchase data.

Start with the shopper’s current intent

The product being viewed is the strongest signal on a product page, but it is not the only one. A recommendation request should consider several layers of context:

  • Current product: category, attributes, brand, price range, tags, and compatible product relationships.
  • Recent behavior: searches, viewed products, category visits, and recently added cart items.
  • Session intent: the query that brought the shopper to the page and filters they selected.
  • Customer history: previous purchases, when the shopper is known and privacy requirements allow its use.
  • Business constraints: stock status, margin, product visibility, regional availability, and promotional priorities.

Do not treat every signal as equally important. A recently viewed product may be relevant, but a product that is incompatible with the item in the shopper’s cart should not be promoted simply because it has a high sales count.

Use WPSOLR data as the relevance layer

WPSOLR is useful when recommendations need more than WooCommerce’s basic category or upsell relationships. Its product index can expose structured fields such as taxonomies, attributes, searchable text, and custom metadata. That allows an agency to build recommendations around the same vocabulary used for search.

For example, a recommendation service for a camera product could use lens mount, sensor format, focal length, and brand as constraints. A simple “same category” query would not understand those relationships. An indexed recommendation query can first find products that share the relevant compatibility fields, then apply stock, price, and merchandising rules.

Keep the index dependable before tuning the recommendation logic. Confirm that variable products, variation attributes, visibility settings, inventory status, and translated product fields are indexed consistently. A recommendation system built on stale or incomplete fields will look random even when its ranking code is sound.

Separate recommendation intent from search intent

A search result page answers, “Which products match this request?” A recommendation module answers, “What is the most useful next product in this context?” Reusing the same query without changing the objective usually produces weak results.

For a related-product request, create a candidate set and then rank it:

  1. Exclude the current product, products already in the cart, hidden products, and unavailable items.
  2. Find products sharing important attributes or compatibility fields with the current product.
  3. Add complementary products, such as cases, chargers, filters, or installation services.
  4. Apply customer or session preferences when there is enough reliable data.
  5. Apply business rules for stock, price, margin, promotions, and category diversity.
  6. Return a small set of results and log the reason each result was selected.

The reason is important. A result can be tagged internally as compatible, complementary, recently_viewed, or popular_in_category. Those labels make it easier to explain unexpected results and compare ranking strategies.

Build useful fallback tiers

Personalization is not equally reliable for every visitor. A first-time visitor may have no history, while a returning customer may have enough behavior to support a more specific recommendation. Use explicit fallback tiers rather than pretending every request is personalized.

  • Tier one: products compatible with or complementary to the current product.
  • Tier two: products matching the shopper’s current category, filters, and search terms.
  • Tier three: popular products within the current category, constrained by stock and price.
  • Tier four: manually curated products maintained by the merchandising team.

This approach prevents an empty module when indexing is delayed, a product has sparse attributes, or the visitor has disabled tracking. It also gives the agency a clear operational rule: every recommendation must have a valid fallback.

Example recommendation request

The following example shows the shape of a recommendation request. The exact WPSOLR integration depends on the search engine and plugin configuration, so treat the query structure as an implementation pattern rather than a copy-and-paste endpoint.

<?php
$context = array(
    'product_id' => $product->get_id(),
    'category_ids' => wp_get_post_terms($product->get_id(), 'product_cat', array('fields' => 'ids')),
    'brand' => $product->get_attribute('pa_brand'),
    'session_query' => isset($_GET['q']) ? sanitize_text_field(wp_unslash($_GET['q'])) : '',
);

$candidates = my_wpsolr_find_candidates($context, array(
    'exclude_ids' => my_get_current_cart_product_ids(),
    'in_stock' => true,
    'limit' => 24,
));

$ranked = my_rank_recommendations($candidates, array(
    'compatibility_weight' => 10,
    'category_weight' => 5,
    'recent_behavior_weight' => 4,
    'popularity_weight' => 1,
));

$recommendations = array_slice($ranked, 0, 6);

The important design choice is not the function name. It is the separation between candidate retrieval and ranking. Candidate retrieval should be broad enough to avoid missing useful products. Ranking should then enforce the rules that matter to the store.

Use behavior without creating a privacy problem

Behavioral relevance does not require storing an unrestricted history of every visitor. For many stores, a short-lived session profile is enough. Store minimal identifiers such as viewed product IDs, selected filters, and recent search terms. Set a retention period, avoid placing sensitive customer data in browser-readable objects, and respect consent requirements for analytics and personalization.

For logged-in customers, use purchase history carefully. A customer who bought a printer may need ink, but repeatedly recommending the exact printer they already own is not useful. Translate order history into states such as owned_category, consumable_due, or compatible_accessory rather than exposing raw order details to the front end.

Prevent common ranking failures

  • Do not recommend unavailable products. Filter stock status before rendering, not after the shopper clicks.
  • Do not overfit to the current product. If every result has the same brand, price range, and category, the module may offer no meaningful choice.
  • Do not use popularity as the first rule. Popularity is a useful fallback, not a substitute for context.
  • Do not mix product and variation logic accidentally. Decide whether the module displays parent products or specific variations and keep URLs, prices, and inventory consistent.
  • Do not cache personalized output globally. Cache anonymous, context-free results separately from session or customer-specific results.
  • Do not let recommendations compete with the primary call to action. On a product page, the current product’s purchase path should remain visually dominant.

Place the module where it can change the next action

Placement should follow the shopper’s decision stage. On the product page, show compatible accessories after the primary product information and before reviews if the accessory helps complete the purchase. In the cart, show practical add-ons that can be purchased without disrupting checkout. On the order-confirmation page, recommend replenishment products or products related to the completed purchase.

Use a distinct recommendation purpose for each location. A “complete the setup” module belongs on the product or cart page. A “buy again” or replenishment module belongs after purchase. Reusing the same six products everywhere makes the store appear less intelligent and makes measurement harder.

Measure incremental conversion

Track more than carousel clicks. At minimum, record the recommendation strategy, source context, displayed product IDs, position, click events, add-to-cart events, and resulting order attribution. Keep the recommendation impression tied to a session or event ID so that reporting can distinguish an impression from a later purchase.

Useful metrics include:

  • Click-through rate by recommendation strategy and placement.
  • Add-to-cart rate after a recommendation click.
  • Revenue per recommendation impression.
  • Average order value for exposed and unexposed shoppers.
  • Conversion rate by new, returning, and logged-in customer segments.
  • Coverage rate: the percentage of recommendation requests that return valid results.

Run an experiment against the store’s existing related-products module. A higher click-through rate is not automatically a win if the module reduces checkout completion or only diverts clicks from a higher-margin product. Evaluate revenue and completed orders, and segment results by device, traffic source, and product category.

Give merchandisers controlled overrides

Automation should not remove merchandising judgment. Provide controlled fields or rules for products that must be promoted, products that must never appear together, compatibility exclusions, and seasonal priorities. Keep overrides narrow and auditable so that they do not turn the recommendation system into a second unmaintainable catalog.

A practical governance model is to let the algorithm choose from an eligible candidate set while merchandisers define eligibility. For example, the algorithm can rank all compatible camera bags, but a merchandiser can exclude clearance items, enforce a minimum margin, or pin a newly launched bag for a limited period.

Agency implementation checklist

  • Audit the product fields indexed by WPSOLR and confirm that important attributes are populated consistently.
  • Define compatibility, complement, and replacement relationships for the store’s major product types.
  • Document anonymous, session, and logged-in personalization rules separately.
  • Implement stock, visibility, cart exclusion, and variation handling before ranking refinements.
  • Add a deterministic fallback for every recommendation placement.
  • Log the strategy and reason for each displayed recommendation.
  • Test cache behavior so that one shopper’s results cannot appear for another shopper.
  • Compare the automated module with the existing baseline using revenue and completed-order metrics.

The goal is not to make every recommendation look personalized. The goal is to make each recommendation defensible: relevant to the current context, compatible with the shopper’s likely need, available to buy, and measurable after it is displayed.

Trending posts
You might also like