Skip to main content
Drupal Integration

How to use Drupal with PureClarity

Peter Brooksbank avatar
Written by Peter Brooksbank
Updated over a week ago


As Drupal is a PHP based platform, you should use our PHP SDK to sync data between your store and PureClarity.


You will need to complete 3 steps in order to start using PureClarity.

Step 1: Send products to PureClarity

Send a Product feed using the PHP SDK. This will allow PureClarity to know what Products are available on your site. We allow up to 4 product feeds per day and each product feed needs to be 150MB or less.

Step 2: Add JavaScript Snippets

We require the use of JavaScript Snippets on the frontend of your store. These load PureClarity onto each page, and allow PureClarity to track the users actions so their experience is personalised.

Step 3: Add Zones

Add Zones to relevant pages. Create some HTML div elements for your PureClarity Zones that will show personalised content.



In order to maximise your use of PureClarity, there are some further steps that we recommend:

Historic Order Feed

This feed “seeds” PureClarity with existing orders. It allows PureClarity to learn about what products are bought with which other products, and what your existing customers have already purchased so their experience is personalised from day 1.

This can be done using the PHP SDK.

Send Category & Brands Feeds

These allow PureClarity to track which categories and brands your customers are purchasing in. These mean that you can get:Brands on the PureClarity Autocomplete. When users enter text into the Autocomplete, links appear for applicable brands. PureClarity Category and Brand recommenders are available. Recommenders such as, “Recommended for you in Clothing”, and “Best Selling Brands” are available to use. You can use the PHP SDK send the Category and Brand Feeds.

Send a User Feed

This feed allows you to pass custom information you have about your customers to PureClarity. This can be used to help Segment your customers which are used in Campaigns and Emails. You can use the PHP SDK send the User Feed.

Use Product Deltas

If your product catalogue is regularly updated several times a day, then you can use the PureClarity Product Deltas to send up to date product information. You can use the PHP SDK send the Deltas.

Offline Orders

If your customers can place orders from another channel for example in a physical store or over the phone – then you can ensure that PureClarity is aware of these orders by sending a daily feed of these offline orders. This means when your customers return to your website, their personalised experience will take into account their offline orders. This can use the same process as the "Historic" orders as outlined above.


Below is a guide to Drupal terms and their equivalent in PureClarity. Note that products and variants are very similar in both implementations.

PureClarity equivalent: Store View

We recommend that your PureClarity setup is the same as your Drupal setup. Therefore if you have 5 Drupal Stores, we recommend you have 5 PureClarity Store Views. There is an additional charge for having multiple PureClarity Store Views. Each Store View has a separate product data set. Each store view can support multiple currencies. Personalization is unique to each Store View.


PureClarity equivalent: Product

PureClarity operates at the product level. Products are surfaced in recommenders in Zones. Clicking on them will take the user to your product page, which will allow them to select the variant they want to purchase. See the Product Data Feed Overview for more information.

Variant / Product Variation

PureClarity equivalent: Variant

Variant information is sent over in the PureClarity product feed. The variant record contains details about the variant, and the parent product it is part of. This is used to surface the correct products in the Zones. See the Product Data Feed Overview for more information.

Attribute / Product Attribute Value

PureClarity equivalent: Attribute

Products and Variants in the PureClarity product feed can contain any attributes from your site. Each record in the product feed will contain all the attributes for that product or variant, with all of the attribute values.

PureClarity uses this data in the facets (filters on the search results and product listing pages).

The data can also be used in PureClarity templates to control how the Product looks when it is displayed. See the Product Data Feed Overview for more information.


PureClarity equivalent: Currency

Each product or variant in PureClarity can contain prices in multiple currencies. The PureClarity Currency Tracking Event is used to switch which currency PureClarity is using.

Did this answer your question?