How does the URL redirect feature work in Klevu?
+-

Klevu offers two types of layouts for the landing page.

  1. Based on the Klevu Template
  2. The one that preserves your native theme layout

Depending on which layout you have chosen our javascript decides where to take your shoppers to when they press the enter key in the search box. But before the shopper is redirected to the search results landing page, our JS will check if there is any URL redirect set in the Klevu Merchant Center (KMC). If there is any URL redirect found for the entered keyword (exact match), the shopper will be taken to that page.

Only when you have chosen the preserving your native layout option and if there is no applicable URL redirect found in KMC, URL redirects in Magento backend are looked upon. If there is any URL redirect found in the Magento backend, it will be respected.

Please refer to Managing URL Redirects for managing URL Redirects in KMC.

How does the synonyms feature work in Klevu?
+-

Synonyms in Magento are treated differently than how they are used in Klevu. In Magento, when someone says “beautiful” is a synonym for the word “gorgeous”, it literally means, if someone types in “gorgeous”, use the term “beautiful” to search. Do not use the term “gorgeous”. Also it is important that the entire query matches the words used for synonyms. In other words if someone says “gorgeous purse”, Magento will not replace the term “gorgeous” with the term “beautiful”.

Klevu, on the other hand, treats synonyms differently. If a customer types in “gorgeous”, Klevu will search for both the terms “gorgeous” and “beautiful”. Also, it doesn’t have to be the exact query. (i.e. searching for “gorgeous purse”, it will fire the following query

(gorgeous OR beautiful) AND purse

In case of the quick search UI, the query is directly submitted to the Klevu servers. The same is true for the landing page based on the Klevu template. In both the cases, synonyms provided in the Klevu Merchant center will be utilised to find the products.

If you are using the native layout option for the landing page, Magento will first look at the query and if there is any applicable synonym, it will replace the original query with the synonym specified in the Magento admin panel. This query is then submitted to the Klevu servers. If there are any synonyms applicable on this modified query, they will be utilised.

Refer following article Managing Synonynms for managing synonynms in KMC.

How to upgrade my plan?
+-

  1. Login into Klevu Merchant Centre (https://box.klevu.com) with the registred email id and password
  2. Go to My Account → Billing

    upgrade1

  3. Click on the Upgrade link under the Billing section

    upgrade-2

  4. Select a plan and click on the Upgrade button

    upgrade-3

  5. On the Upgrade Plan screen, click on the Pay Now button. Your account will be upgraded to the selected new plan

A/B testing Klevu Search with Google Tag Manager
+-

A/B testing Klevu Search with Google Tag Manager

At Klevu, often, we are asked if our customers can perform A/B testing to check if the Klevu Search is better than their existing search solution. What the customers usually want to know is how much the Klevu Search is helping them in search led conversions.

Google Tag Manager (aka GTM), is one of the popular tools that allow you to monitor consumer activities on a website, including what they search, click and buy. From the GTM’s perspective, monitoring such activities is a process called setting up “tags” in GTM. For the every tag setup in GTM, Google provides a snippet of code to be included on your website. This code is responsible for sending the required data to Google.

In this document, we provide information on setting up GTM to perform A/B testing for Klevu Search.

It is, basically, a three steps process:

  1. Setting up a Google Tag Manager (GTM) account
  2. Setting up GTM testing environment (i.e. obtaining snippets of codes to include on your website)
  3. Making minor changes to the Klevu Search codebase to enable/disable Klevu Search based on a parameter configured by the GTM code.

Setting up a Google Tag Manager account

  1. If you already have a GTM account, please login into it. Otherwise, please follow the steps mentioned at https://support.google.com/tagmanager/answer/6103696#CreatingAnAccount to create a new GTM account.
  2. Once the account is created, you need to add a container for your website. Container is just a collection of tags that you like to add to your website (e.g. for measuring analytics, adwords conversions etc). Please follow the steps at https://support.google.com/tagmanager/answer/6103696#AddingTheContainerSnippet to create a new container for your website.

Setting up an A/B Test in GTM

  1. Login into your GTM account
  2. Choose the respective account for your website and the container
  3. Click on the tags > Add a new tag > Custom HTML Tag
  4. Under the “Configure Tag”, paste the following code and click on the “Continue” button.
  5. Under the “Fire On” section, click on the “More” > “NEW” button
  6. A new window with a title “Create Trigger” will open. Here, under the “Choose Event” section, please click on the “Custom Event” button.
  7. Set the event name to call_gtmtesting.
  8. Click on the “filters” button and configure the condition as: event — equals — call_gtmtesting.
  9. Click on the “Create Trigger” and “Save Trigger” buttons.
  10. Click on the “Create Tag” button.
  11. Click on the “Save Tag” button.
  12. At this stage, please go to your google analytics account (i.e. https://analytics.google.com) and find out the google analytics code for your website. The code should look like UA-XXXXXXXX-X. You will need this in the next steps.
  13. Once you have the Google Analytics code, now is the time to configure parameters for your A/B test. Please go to http://abtestguide.com/gtmtesting/createtest.html and fill up the details as described below.
    Test Details

    • Test ID: eg: AB-Klevu01
    • Test name: Klevu Search AB Test

    Control

    • Description: Klevu Search Enabled
    • Code: var klevu_search_disable=false;

    Variation B

    • Description: Klevu Search Disabled
    • Code: var klevu_search_disable=true;

    Integrations

    • Analytics: Select the option “Universal Analytics”
    • Property ID: here, provide your analytics code, the one you had copied from your google analytics account (e.g. UA – XXXXXXXX-XX).
    • Event Category: AB Test

    Targeting

    This section allows you to distribute your traffic between Klevu and the other search module(s) you have on your website.

    • Exposure Rate: 100%
    • Traffic Control: 50% (Klevu search will be activated to 50% of your customers)
    • Traffic Variation B: 50% (The other search option on your website will be activated to rest of the 50% customers)
  14. Click on the Generate AB test Code button. This will generate a code at the bottom of the page. You need to copy this code and generate another tag in your GTM manager.
  15. Add another custom tag in your GTM account (i.e. Click on the tags > Add a new tag > Custom HTML Tag) and name it “GMT Testing”.
  16. Copy the code from step 14 and paste it in the HTML area of “Configure Tag”.
  17. Under the section “Fire On”, click on “More” > “New” > “Custom Event” and select the “Page View” option.
  18. Under the “Configure Trigger”, select the “DOM Ready” option.
  19. Under the “Fire On” section, select the “All Page Views” option and click on the “Create Trigger” button.
  20. Click on the “Create Tag” button.
  21. Make sure to publish your container by clicking on the “Publish” button at the top right corner of your page. This will make the test live on your website.

Changes in the Klevu’s code base

If you have followed all the steps so far, when you view the source of your website (i.e. right click anywhere on the page > view source), you will see that for some sessions, GTM would insert the following javascript variable on the page.
var klevu_search_disabled=false;

For the other session, it would be
var klevu_search_disabled=true;

You need to ensure that you add the following if statement surrounding the Klevu’s javascript.

<script>
if(klevu_search_disabled !== true) {// insert here the javascript provided by Klevu
var klevu_apiKey = ‘klevu-XXXX’, klevu_analytics_key = ‘klevu-XXXX’, searchTextBoxName = ‘txtSearch’, klevu_lang = ‘en’, klevu_result_top_margin = ”, klevu_result_left_margin = ”;var klevu_changePositionOnScroll = true; (function () { var ws = document.createElement(‘script’); ws.type = ‘text/javascript’; ws.async = true; ws.src = ‘https://js.klevu.com/klevu-js-v1/js/klevu-webstore.js’; var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ws, s); })();

}
</script>

You’re done!

Any questions or need any help? Please feel free to write to us at support@klevu.com

How do I setup a CRON?
+-

Setting up a CRON

Magento has released its own instructions on setting up a CRON. Please follow the instructions at the URL below:

http://www.magentocommerce.com/knowledge-base/entry/ce18-and-ee113-installing#install-cron

Alternatively, if you have access to cPanel, here is a good tutorial on setting up CRON from your cPanel.

http://www.magentotutorials.co.uk/magento-cron-setup-in-cpanel

How to check whether CRON is running or not?

  1. Point your browser to http://[your-domain]/cron.php. If the browser is able to locate and execute it, the permissions are set properly.
  2. Check the timestamp of Last Sync
    1. In Magento Admin Panel, Go to System → Configuration
    2. Open Search Configuration under Klevu
    3. Select storeview from “Current Configuration Scope”
    4. Find Product Sync Settings panel
    5. Check time of the Last Run
    6. If it is too old and does not match with your cron schedule, there might be something wrong with your CRON setup or product sync

If you are on Mangeto version 1.8 or above:

There is a possibility that CRON is still not working after setting it up. To solve this, please check the following:

  1. Open the Magento cron.php file in a text editor. You can do this by logging in to your account using SSH, or if your account includes cPanel, from the cPanel File Manager
  2. Locate the following code block around line 45:


    $disabledFuncs = explode(',', ini_get('disable_functions'));
    $isShellDisabled = is_array($disabledFuncs) ? in_array('shell_exec', $disabledFuncs) : true;
    $isShellDisabled = (stripos(PHP_OS, 'win') === false) ? $isShellDisabled : true;

  3. Copy the following line of code and paste it after the code block above


    $isShellDisabled = true;

  4. Save the changes to the cron.php file. The CRON should run now correctly.

How to solve the "Class not found" error in the log?
+-

  • Note down the file for which the error is reported
  • Go to the respective folder in your Magento installation folder
  • Check permission of the folder and all the files in that folder
    According to the Magento conventions, the files should have at least 644 permission and the folders 744. Fixing the permissions should solve the issue. If it does not, please let us know the error by writing to us at support@klevu.com

Can I integrate Klevu Search with Google Analytics?
+-

Yes, you can integrate Klevu Search with Google Analytics

If you are using Google Tag Manager, please also follow the steps in the guide below to integrate Klevu with your GTM account.
GTM Integration Guide

By default, Google analytics tracks the search queries which are redirected to search landing page (search results page).

If you want to track the “Search-as-you-type” queries (AJAX search) in google analytics, here are the steps:

  1. Login to your Google Analytics account at http://www.google.com/analytics
  2. Click on Admin
  3. Click on View Settings
  4. Under the Site Search Settings, turn on Site search Tracking (if it is not already on).
  5. Input klevusearchterm as the additional Query Parameter
  6. Check the box Strip query parameters out of URL
  7. Click on the Save button

google-analytics-integration

 

 

 

 

 

 

 

 

 

Is it possible to restrict search to a category that shopper has chosen from a category dropdown?
+-

Yes, it is possible.

In our javascript we have a variable called klevu_category. Before our
javascript fires a query to our servers to obtain search results, it checks if the klevu_category variable is initialised. If so, the value of this variable is used as a category filter.

If you have a dropdown where you allow your customers to choose a category, we suggest that whenever your customer is choosing a category or changing his/her selection of the category, you change the value of the the klevu_category variable. The value should be the name of the category. If no category is selected, please assign an empty string to the klevu_category variable.

Is it possible to change captions of filters?
+-

The Klevu Search plugin already uses the labels of attributes (as specified in the Magento admin panel) as captions in the search results. To change them, please change them in your Magento admin panel.

  1. Login to Magento Admin Panel
  2. Go to Catalog → Attributes → Manage Attributes
  3. Choose the relevant attribute
  4. Click on the Manage Label/Options and specify the caption you want to use for the respective attribute
  5. Click on the Save config button

Once done with the changes above, please resynchronize your products.

How to update stock and prices when using third party tool or ERP in Magento?
+-

If you are using an ERP or 3rd party tool for product updates then please follow the below steps:

  1. Login into Magento admin panel
  2. For Magento 1
    Go to System → Configuration → Klevu → Search Configuration
    For Magento 2
    Go to Stores → Configuration → Klevu → Search Configuration
  3. Go to Developer Settings (the option is visible at “default config” level)
  4. Select “are using an ERP OR 3rd party tool for product updates” to “Yes”
  5. Click on Save button

How to integrate Google Analytics (GA) with Klevu search using Google Tag Manager (GTM)?
+-

This guide provides instructions for integrating Google Analytics with Klevu search using Google Tag Manager

This guide assumes that you’re already set up with GTM account and you have created a container for your store. If not, please follow the guide here to do so: https://support.google.com/tagmanager/answer/6103696?hl=en

When you login into your GTM account, you will see a list of containers.
No Image
Select the container for which you want to integrate GA.

  1. Set up GTM Data Layer variable
    • Go to Variables -> User-Defined Variables and then click on New
      No Image
    • Set up a variable for klevusearchterm
      No Image
    • You should now see the variable listed in the variables dashboard.
      No Image
  2. Set up GTM Virtual Pageview Trigger
    • Go to Triggers tab and then click on New
      No Image
    • Create the trigger as a custom event
      No Image
  3. Set up GTM Virtual Pageview Tag
      Now we need to configure a GTM tag, which is the link between GTM and Google Analytics so that the data can actually be logged.

    • If you don’t have GTM tag then
      • Go to Tags and then click on New
        No Image
      • Set the following details
        • Set the tag name
        • Choose Product: Select Google Analytics
        • Choose a Tag Type: Select Universal Analytics (or Classic if you’re still using it)
        • Configure Tag:
              • Insert your GA linking information (Tracking id)
              • Track Type: Page View
              • More settings -> Fields to set
                    • page : {{klevusearchterm}}

                No Image

          Please note that if you already have other fields set in “Fields to set” section, just add a new field for “page” and set its value to {{klevusearchterm}}

        • Fire On: Select “track klevu terms”
          No Image
    • If you already have the tag for GA, please edit it as below:
      No Image
  4. Publish changes

What are the languages supported by Klevu Search?
+-

Klevu Search supports all the languages, where the data is provided in UTF-8 encoded script. Additionally, Klevu Search also supports Chinese, Japanese and Korean languages. Currently, advanced enrichment features of Klevu are available only for English, French and Finnish language.

Please note that even though the Klevu Search supports various languages as explained above, currently, the Klevu Merchant Center is available only in the English language.

How to remove products of development/staging site from live site?
+-

If products of your development/staging site appear on live site, then you can remove them by following below steps

  1. Login into Klevu Merchant Center (https://box.klevu.com) with the registered email id and password
  2. Choose the appropriate store from the drop down at the top from which you want to remove test data
    Remove data
  3. Go to Shop Info → Remove Data
  4. Enter the starting URL of products (i.e. https://staging.mystore.com/ or http://37.187.171.90/) which you want to delete from Klevu Search indices and click on Submit button
    Remove data
  5. If Klevu finds the records, it will show the number of records starting with the given URL
    Remove data
  6. Click on Continue button and allow up to 15 minutes to remove the data from Klevu Search indices
  7. Delete both the JS API key and REST API key from your development/staging environment. This step is very important to ensure synchronization is not happening from both the staging and production environments.

How to synchronize images from Configurable products in Magento?
+-

To synchronize images from Configurable products in Magento, follow the steps mentioned below:

  1. Login into Magento Admin panel
  2. Go to System → Configuration
  3. Go to Klevu → Search Configuration
  4. Select the appropriate store view from the Current Configuration Scope
  5. Under the Product Image Settings,select Yes for Use Configurable Product’s Image in Search
  6. Click on Save Config
  7. Once you have changed the settings, please synchronize product updates by following the steps specified in Synchronize Data

Why products are not synchronized with Klevu?
+-

Possible reasons:

For Magento platform:
  1. CRON is not setup properly
    Magento uses CRON jobs for ‘automatically’ updating currency rates, catalog price rules, Google sitemaps, customer notifications etc.
    Klevu Search plugin also relies on CRON to synchronize products. It is, therefore, very important that you setup a cronjob to execute cron.php OR cron.sh found in your Magento installation folder.

  2. Magento indices are not uptodate
    We strongly recommend that you update the indices (from System > Index Management) and keep the mode of your indexes to “Update on save”.

    1. In Magento Admin Panel, Go to System → Index Management
    2. Select All indices
    3. Select Reindex Data in Actions
    4. Click on the Submit button
    5. To make sure Magento indices are always in uptodate status
      • Select Change Index Mode in Actions
      • Select Update on Save in Index mode
      • Click on the Submit button
  3. You update the products directly in DB (manually or using any third party API?) OR importing the data using any bulk data import utility
  4. If none of the above points are valid and products are not synchronized with Klevu, please send Klevu_Search.log (under [magento-root]/var/log/] file to support@klevu.com to investigate the issue.
For custom stores:
  1. Feed URL is not uptodate
    If registered feed URL is not uptodate, it will not display the updated products in search results. Please make sure to export the latest updates in the feed URL.
  2. Parsing error in product feed
    If Klevu could not parse the product feed URL for indexing then updated products will not be displayed in search results. Please check the XML/CSV feed URL submitted to Klevu.

How to show category hierarchy in search suggestions?
+-

Please follow the steps below to show the category hierarchy in search suggestions. Please note, this will show maximum three level of category hierarchy in category suggestion.

This solution is only for Magento 1 platform.

1. Open app/code/community/Klevu/Search/Model/Product/Sync.php
2. Search for the line below:

$value["name"] = $category->getName();

3. Replace above with the below one:

if($category->getParentCategory()->getLevel() > 1) {
 if($category->getParentCategory()->getLevel() > 1){
 $value["name"] = $category->getParentCategory()->getParentCategory()->getName()." > ".$category->getParentCategory()->getName()." > ".$category->getName();
 } else {
 $value["name"] = $category->getParentCategory()->getName()." > ".$category->getName();
 }
 } else {
 $value["name"] = $category->getName();
 }

4. Perform full product sync by following the guide below, please remember to select “All Data” option.
http://support.klevu.com/knowledgebase/synchronize-data-with-klevu-search-2/