In this tutorial we will:
- Install Drupal Commerce Kickstarter as our shop and content management system
- Install the RecommenderGhost module
- Enable the RecommenderGhost module
- Create account at www.recommenderghost.com (it's free)
- Register your website in RecommenderGhost
- View the shop and validate configuration
- Enable blocks for "Users also viewed / bought"
Step 1: Install Drupal Commerce Kickstarter
If you don't already have a Drupal Commerce instance, the first thing you need to do is install it. If you do already have an instance (either a clean instance or something running your website), skip to the next step.
You should download the lastest version of Drupal 7 Commerce Kickstart distribution from the Drupal Download Site. You need to ensure you are running PHP 5.3 or above. For more information on installing Drupal, see the Drupal Installation Guide.
Ensure you can log in to your Drupal instance as an administrator.
Step 2: Install the RecommenderGhost module
Once you have Drupal Commerce up and running the next step is to install the RecommenderGhost module for Drupal.
Note: Ensure that you have Clean URLs enabled in Drupal as the module requires it. You can find this at Administration » Configuration » Search and Metadata » Clean URLs
Download it and extract it into the modules area of your Drupal site (DRUPAL_HOME/sites/all/modules/recommenderghost)
Step 3: Enable the RecommenderGhost module
Once the module is installed, you need to enable it and verify it is working correctly.
Note: Our RecommenderGhost module works with any Drupal 7.x version. If you are not using the Drupal Commerce Kickstart distribution you may need to install other modules before you can enable parts of the RecommenderGhost module.
Go to Site settings » Advanced settings » Modules, and enable the RecommenderGhost-Core and RecommenderGhost-Commerce modules.
Verify that it has created an new administration section (Administration » System » RecommenderGhost)
Step 4: Create account at www.recommenderghost.com (it's free)
If you have not yet an account with RecommenderGhost you can create one now. Basic registration is free (and will stay free) and no credit card or personal information other than your email address is required.
After you have filled-in the form and clicked on "Create new account" you will receive an email with a link to confirm your registration. Only after you have clicked on the link in the email (or copied and pasted it in your browser) will you be able to fully make use of our services. We need to do this to avoid spam and misuse.
Step 5: Register website in RecommenderGhost
As soon as you have confirmed your email address you can create new websites that we should track. On the RecommenderGhost website click "My websites" - "Create a new website". You are asked to enter a short name (eg "my watch shop"), a description and the URL of the website to track (this should be the URL you created your Drupal Commerce installation in). Confirm by clicking "Save".
When you click on "How to integrate your tracking code" you will see an API key and an ID. Copy them as you will need both of them for the next step.
Step 6: Configure tracking
Great - you are now ready to track your website. Only a little bit of configuration is needed. Go back to your Drupal Commerce site RecommenderGhost administration section (Administration » System » RecommenderGhost).
Now, enter your API key and Website ID. In the section "Image" insert into the field "Pattern for the image" the following token: "[node:field-product:0:field_images]" (including brackets).
Note: If you are using a standard Drupal installation just replace this token with the name of the image fields.
That's it. Your RecommenderGhost module is now ready to use. Click save.
Step 7: Browse your site/shop and validate configuration
To validate your configuration, visit your new shop and click a few products. If you go to your RecommenderGhost website profile you will be able to see all trackings in real-time.
Step 8: Enable blocks for "Users also viewed / bought"
Until now, we have only setup and configured the basics to track what pages / products our users look at / buy. We still miss to show any actual recommendations. In order to do this, we will use the prepared Drupal blocks that are shipped with the RecommenderGhost module.
Note: After our registration of the website in RecommenderGhost, we need to wait 6 hours to get recommendations. This is for 2 reasons: 1) we make sure that we have actually some data available to calculate recommendations and 2) the calculation of recommendations happens once a day. If you need a more frequent update, please contact us.
Go to block administration (Site settings - Visual & Layout - Blocks). Move the blocks ("RecommenderGhost: Users also viewed (picture view") into the content area below and click "Save blocks". If you review your product detail page you will see your first product recommendations.
Congratulations. You just implemented a first-class recommendation engine.