Install Motive on other platforms

If your shop isn't built on PrestaShop, WooCommerce, Magento, or Shopify, you can still use Motive Commerce Search. This applies to shops built on other ecommerce platforms, such as BigCommerce, on frameworks such as Laravel or Laminas, or developed in-house.

Without a Motive plugin, you provide your product catalogue as a feed and add the search layer to your shop's frontend. You complete the rest of the setup in the Playboard, as with supported platforms.

Technical knowledge

This installation requires changes to your shop's code. We recommend involving a developer with access to your shop's frontend and server.

The installation has five main parts:

  1. Prepare your product feed and, optionally, a schema.
  2. Sign up to Motive to get your account.
  3. Complete the setup wizard to connect your catalogue and synchronise it.
  4. Add the search layer to your shop with a configuration snippet and the Motive script.
  5. Customise the search layer in the Playboard to match your shop's design.

Before you start, check the requirements below. Once you finish, check your installation to make sure the search layer works in your shop.

Requirements

Before you start, make sure you have:

  • A product feed in Google Shopping or Motive format for each language of your shop, available at a public URL.
  • Optionally, a schema for each feed, available at a public URL. If you don’t have one, you define it in the setup wizard.
  • Access to your shop's page templates to add a JavaScript snippet and the Motive script.
  • A shop that meets the technical requirements.

Preparing your feed and schema

Before you start the setup, prepare a product feed, that is, the list of your products, for each language of your shop. Publish it at a public URL. Motive downloads it every time it synchronises your catalogue.

Motive also needs a schema for each feed. The schema tells Motive where each piece of data is in your feed and what it is, such as the name, price, or image. You can define it in the setup wizard or create it yourself.

Feed

Your feed must use one of these formats:

  • Google Shopping (XML): The feed your shop generates for Google Merchant Center. Most ecommerce platforms can export it. To learn more about the format, see the Google Merchant Center product data specification (opens new window).
  • Motive (JSON, JSONL, or XML): Motive's own format. Use it if you can export your catalogue as a custom file, preferably in JSON.

Whichever format you use, make sure that your feed meets these requirements:

  • Your feed is available at a public URL of 255 characters or fewer.
  • Each product has a unique ID.
  • Each product includes an ID, name, product URL, price, image, and availability.
  • Prices don't include a thousands separator. For example, use 1299.99, not 1.299,99.
  • In Google Shopping feeds, availability is in_stock, out_of_stock, preorder, or backorder.
  • In Google Shopping feeds with variants, if you want one product name for all the variants of a product, each item includes g:item_group_title. See Defining your schema.

feed formats

To see an example of each format, see Feed and schema reference.

Schema

In the setup wizard, you provide the schema in one of these ways:

  • Define a schema: You select your feed type and review how the fields in your feed match Motive fields. Motive builds the schema for you. You don't need to prepare anything else.
  • Use a schema URL: You create the schema as a JSON file and publish it at a public URL. Use this option if you need options that the wizard doesn’t include, such as custom category separators or search settings for each field, or if your Google Shopping feed doesn’t use the standard attribute names.

The schema describes your feed, but doesn't change it. It includes:

  • Metadata: How Motive reads the feed, such as the format (XML, JSON, or JSONL) and the type (GOOGLE_SHOPPING_FEED or MOTIVE).
  • Fields: The product fields Motive uses. For each field, the schema sets an ID, a type, and the path where the data is in the feed.

The schema must include fields for the product ID, name, URL, price, image, and availability. Each path must point to data that exists exactly as written in your feed.

For example, this is a product in a Google Shopping feed:

<item>
  <g:id>1</g:id>
  <g:title>Printed T-shirt</g:title>
  <g:link>https://www.myshop.com/printed-t-shirt</g:link>
  <g:image_link>https://www.myshop.com/img/1.jpg</g:image_link>
  <g:price>28.68 EUR</g:price>
  <g:availability>in_stock</g:availability>
</item>

This schema reads this feed. Each path is the name of an attribute in the feed, without the g: prefix:

{
  "metadata": {
    "feed": { "format": "XML", "type": "GOOGLE_SHOPPING_FEED", "tag": "item" }
  },
  "fields": [
    { "id": "id", "type": "id", "path": "id" },
    { "id": "name", "type": "name", "path": "title", "features": { "searchable": true } },
    { "id": "url", "type": "link", "path": "link" },
    { "id": "image_url", "type": "image_url", "path": "image_link" },
    { "id": "price_regular", "type": "price_regular", "path": "price" },
    { "id": "availability_allow_order", "type": "availability_allow_order", "path": "availability" }
  ]
}

warning

A misspelled field type invalidates the whole schema, and synchronisation fails.

creating your schema

To learn about all field types, categories, and variants, and to see complete examples for both feed formats, see Feed and schema reference.

Before you start the setup, check your feed and schema against the checklist, or validate them automatically with the validation files.

Signing up to Motive

Once your feed is ready, sign up to Motive and confirm your email address in the same way as for supported platforms:

Motive signup form with the Name, Shop URL, Email, and Password fields, and the Start 30-day free trial button

  1. In Name, write your first name.
  2. In Shop URL, enter your shop's website address.
  3. In Email, write your business email address.
  4. In Password, enter a password for your Motive account.
  5. Select the checkbox to accept Motive's Terms and Conditions (opens new window) and the Privacy Policy (opens new window).
  6. Click Start 30-day free trial to create your Motive account.

You get a confirmation email to the email address you provided. The confirmation email expires after 1 hour. If it expires, log into Motive with your business email address and the password you chose when signing up, and click Send again.

To continue with the setup process, check your inbox and confirm your email address by clicking Validate my account. Then, log into Motive with your business email address and the password you just chose when signing up. You're automatically redirected to the setup wizard.

Completing the setup wizard

After you sign up, the setup wizard guides you through five steps:

  1. Choose platform: Select the installation type.
  2. Company details: Enter your company details.
  3. Plans and billing: Check the Motive plans and enter your billing details.
  4. Connect to Motive: Enter your shop details and add your catalogues.
  5. Sit back and relax: Motive synchronises your catalogue for the first time.

Choosing your platform

After you log in, the setup wizard starts. In the first step, Choose platform, the Other option covers any shop not built on PrestaShop, WooCommerce, Magento, or Shopify, including custom-built shops.

Choose platform step of the setup wizard, with the Other option selected and a description of what this installation involves

To continue the setup with this option:

  1. Click Other.
  2. Click Go to next step.

Entering your company details

In the second step, Company details, you enter your company details.

Company details step of the setup wizard, with the Company name and Business type fields

Complete your business information as follows:

  1. In Company name, write the name of your business.
  2. In Business type, select an option to indicate what your business is about.
  3. Click Continue to go to the next step.

Entering your billing details

In the third step, Plans and billing, you first see the prices of the Motive plans. You don’t need to select a plan at this point. Click Continue for the free trial to add your payment details.

Plans and billing step of the setup wizard, with the billing details form and a notice about the temporary 1 € charge

Then, follow these steps to enter your billing information:

  1. In Company, enter the name of your business.

  2. In Tax ID, enter your VAT number, EIN, or other tax ID, if applicable.

  3. In Address 1, enter the main address of your business. Use Address 2 for additional details, such as the floor or suite, if needed.

  4. In City, enter the city where your business is based.

  5. In Country, select your country.

  6. In ZIP, enter your postal code.

  7. In State, enter your region, province, or state, if required.

  8. Click Complete payment method to continue.


You're redirected to the billing platform, where you enter your card details. Then, you're automatically redirected to the next step of the setup wizard.

note

To validate your payment method, Motive applies a temporary charge of 1 €. You aren't charged for a plan until your free trial ends. Once you enter your billing details, you get an email confirming that your free trial has started.

Connecting to Motive

In the fourth step of the setup wizard, Connect to Motive, you enter your shop details and add a catalogue for each language of your shop. For each catalogue, you also tell Motive how to read it: you define the schema in the wizard or use a schema URL. Motive then builds its search index from your catalogues.

Connect to Motive step of the setup wizard, with the Shop name and Shop URL fields, the Test/Production toggle, and a catalogue with the Language and Product feed URL fields and two tabs: Define a schema and Use a schema URL

Entering your shop details

First, enter your shop details as follows:

  1. In Shop name, enter the name of your shop.
  2. In Shop URL, enter the URL of your shop.
  3. Use the Test/Production toggle to select the environment where you use Motive search:
    • Test: Lets you check the integration without affecting your live shop.
    • Production: Runs Motive search in your live shop.

note

If your shop needs credentials, use this format to enter your shop's URL: https://user:password@www.myshop.com.

Adding your catalogues

After entering your shop details, you add a catalogue for each language of your shop. For each catalogue, you enter the URL of its feed and tell Motive how to read it. If you haven't published your feed yet, see Preparing your feed and schema.

One of your catalogues is the default catalogue. Motive uses its language as the main language of your shop. By default, it's the first catalogue you add.

To add your catalogues, follow these steps:

  1. In Catalogues, complete the default catalogue:
    1. In Language, select the language of the catalogue.
    2. In Product feed URL, enter the URL of your feed for that language.
    3. Describe your feed in one of these ways:
  2. To add a catalogue for another language, click Add catalogue and repeat step 1.
  3. To use another catalogue as the default, select Default catalogue in that catalogue.
  4. Click Connect Motive to start indexing your catalogues.

Defining your schema

In Define a schema, you describe your feed in the wizard, and Motive builds the schema from your settings.

Define a schema tab in the Connect to Motive step of the setup wizard, with a Google Shopping feed in XML, the Group variants toggle on, and the field mapping table that matches feed fields to Motive fields, with the Per variant column

First, in Feed, describe your feed:

  1. In Feed type, select the format your feed follows: Google Shopping or Motive.

  2. In Feed format, select the file format of your feed. With Google Shopping, it's always XML. With Motive, select XML, JSON, or JSONL.
    Below Feed format, you can see how Motive expects to find each product in your feed. For example, in a Google Shopping feed, each product is an <item> element.

  3. If your feed is in Google Shopping format and includes variants, turn on Group variants. Group by shows the attribute Motive uses to group them, item_group_id. Motive shows the items that share the same item_group_id as one product with variants.

    warning

    Turn on Group variants only if several items in your feed share the same item_group_id. If each item has its own item_group_id, Motive replaces the ID of each product with its group ID.

Then, in Field mapping, check how the fields in your feed match Motive fields and edit them if needed. Each row shows a field in your feed (Feed field), the field it matches in Motive (Motive field), and the type of data it contains (Type). The table includes two kinds of fields:

  • Required fields: Motive maps them automatically, depending on the feed type:
    • Google Shopping: id, title, link, price, image_link, and availability. You can't change them. If you turn on Group variants, the product name can come from item_group_title instead of title. See the Per variant column below.
    • Motive: id, name, url, price, images, and availability. If your feed uses other names for these fields, change them in Feed field.
  • Optional fields: Fields marked as (optional). Motive suggests common fields, such as description, brand, or category. You can change them, or click the delete icon to remove them.

To add other fields from your feed, for example an attribute you want shoppers to search by, follow these steps:

  1. Click Add field.
  2. In Feed field, enter the name of the field in your feed.
  3. In Motive field, enter a name for the field in Motive, such as material. Use a different name for each field, without spaces. To learn more, see Fields.
  4. In Type, select the type of data the field contains. To learn about each type, see Field types.

In Google Shopping feeds, if you turned on Group variants, the table also shows the Per variant column. Select the fields that can change between variants, such as the colour or size. Some fields are set and you can't change them: the ID, product URL, prices, image, and availability always have a value for each variant.

For the product name, its Per variant checkbox is selected by default. Feed field changes to match your choice:

  • Selected: Each variant keeps its own name, taken from title.
  • Cleared: All the variants of a product share one name, taken from item_group_title. Each item in your feed must include g:item_group_title, with the same value for all the items that share an item_group_id. If the items don't include it, Motive indexes the products without a name, and they're unlikely to appear in search results. Clear the checkbox if the title of your items includes variant details, such as the size or colour, that you don't want to show on the product card.

When you finish, go back to Adding your catalogues to add more catalogues or click Connect Motive.

searchable fields and filters

After the first synchronisation, you can choose in the Playboard which fields shoppers can search by and which ones they can use as filters. To learn more, see Managing searchable fields and Managing filters.

Using a schema URL

If you've created your own schema, select Use a schema URL. In Schema URL, enter the URL of the schema for that language. To learn how to create it, see Schema.

Use a schema URL tab in the Connect to Motive step of the setup wizard, with the Schema URL field

When you finish, go back to Adding your catalogues to add more catalogues or click Connect Motive.

Synchronising your catalogue

After you click Connect Motive, the wizard moves to the last step, Sit back and relax. Motive downloads your feed and indexes each catalogue for the first time.

Sit back and relax step of the setup wizard, showing a catalogue in Spanish with the Indexing status

You can see the status of each catalogue:


When all catalogues are indexed, you're redirected to the Motive Playboard, where you can get the code to add the search layer to your shop.

note

The first synchronisation can take from a few minutes to a couple of hours, depending on the size of your catalogue. You can leave the page while it runs. You get an email when it's ready.

After that, Motive synchronises your feed once a day to update the search index with any changes. You can synchronise your feed manually through the Synchronisation option in the Playboard.

Fixing a failed synchronisation

If a catalogue shows Failed, check your feed and schema against the checklist. The most common causes are:

  • The feed or schema URL isn't public or is wrong.
  • The feed doesn't include a required field, such as title or price, or uses another name for it.
  • If you use a schema URL, the schema includes a misspelled field type or is missing a required field.
  • A Google Shopping feed uses availability values other than in_stock, out_of_stock, preorder, or backorder.
  • Prices include a thousands separator.

Then, do one of the following:

  • To try again with the same URLs, for example after fixing the files at their current URLs, click the retry icon next to the catalogue.
  • To change the feed URL or schema, click the edit icon next to the catalogue. In the Edit catalogue window, update the Product feed URL or edit the schema, and click Save.

If the synchronisation still fails, select Support to ask the support assistant or open a support ticket.

Adding the search layer to your shop

Once your catalogue is synchronised, you add the search layer to your shop with a configuration snippet that initialises Motive search and the Motive script. You add both to the page template your shop uses on every page with a search box.

After the first synchronisation, the Playboard opens the Search layer activation page, where you get the code. To open it later, go to Settings > Search > Search layer activation. The page shows the code for your default catalogue.

Search layer activation page in the Playboard settings, with the steps to add Motive to a shop, the configuration snippet and the Motive script for the selected catalogue, and the Copy snippet button

To add the search layer, follow these steps:

  1. Click Copy snippet. The code includes the configuration snippet and the Motive script:

    <script>
      window.motive = {
        xEngineId: 'YOUR_ENGINE_ID',
        lang: 'LANGUAGE_CODE',
        currency: 'CURRENCY_CODE',
        triggerSelector: 'YOUR_SEARCH_BOX_SELECTOR',
        isolated: true,
      }
    </script>
    <script type="module" src="https://assets.motive.co/front-loader/custom/v1.js"></script>
    

    In the Playboard, YOUR_ENGINE_ID and LANGUAGE_CODE are already replaced with the values of the selected catalogue.

  2. Paste the code into your page template. Keep the configuration snippet before the Motive script.

  3. In the code you pasted, replace the other placeholders with your shop's values:

    Placeholder Value
    CURRENCY_CODE The ISO 4217 (opens new window) code of your shop's currency, such as EUR or GBP.
    YOUR_SEARCH_BOX_SELECTOR The CSS selector of your shop's search box. The search layer opens when shoppers select this element. To learn how to find it, see Selecting your CSS search element.

    Example of a completed snippet:

    <script>
      window.motive = {
        xEngineId: '00000000-0000-0000-0000-000000000000',
        lang: 'en',
        currency: 'EUR',
        triggerSelector: '#search-input',
        isolated: true,
      }
    </script>
    

    warning

    The type="module" attribute of the Motive script is required. The script doesn't load without it.

  4. If your shop has several languages, select another language in the language selector at the top of the page and repeat steps 1 to 3 for each language. Each language has its own engine ID, so add the code for each language to the pages in that language.

snippet configuration options

To add more options, see the Snippet configuration reference and Using callbacks for an example of add-to-cart support.

Using callbacks

Callbacks are optional functions that connect the search layer to your shop. You add them in callbacks, inside window.motive. You can use them to:

  • Let shoppers add products to the cart from the search layer.
  • Change prices in the search layer, for example to show discounts for logged-in customers.

For example, to let shoppers add products to the cart, add these callbacks:

  • UserClickedResultAddToCart: Adds the selected product to your shop's cart. It must return a promise (opens new window) that resolves once the product is in the cart.
  • CartHandlerGettingCartInfo: Returns the number of products in the cart.

window.motive = {
  // ...your snippet configuration
  callbacks: {
    UserClickedResultAddToCart: result => myShop.addToCart(result.id),
    CartHandlerGettingCartInfo: () => ({ productsCount: myShop.getCartCount() }),
  },
}

In this example, myShop.addToCart and myShop.getCartCount represent your shop's own cart functions.

To also show a cart button in the search layer, add cartUrl to window.motive with the URL of your cart page, for example cartUrl: '/cart'. Without it, the cart button is hidden.

To change prices and to see all available callbacks, see Callbacks and the full example.

Customising the search layer

Once the search layer works in your shop, you can customise its appearance in the Playboard, as with supported platforms. To learn more, see Managing visual customisation.

Checking your installation

Reload your shop and select the search box. The search layer opens and shows results from your catalogue.

If the search layer doesn't open, check that:

  • The snippet is before the Motive script.
  • triggerSelector matches your search box.
  • The Motive script includes type="module".

If the search layer opens but shows few or no results, check that your products have a name in the feed. In Google Shopping feeds with grouped variants and one product name for all variants, each item must include g:item_group_title.

If the issue continues, check the Motive status page (opens new window) or select Support in the Playboard to ask the support assistant or open a support ticket.