Full Installation Walkthrough of Clerk.io for Other / Custom Platforms
Adding a Store in my.clerk.io
Each Store in Clerk.io is an isolated environment with its own data, API keys and Dashboard. The first thing you will need to do when setting up your Clerk.io account, is to create your first Store:
After setting up your store, the Setup Guide will of course provide some guidance around the rest of your custom Clerk.io installation.
Installing the two tracking-scripts
Clerk.io uses two main scripts to work on a webshop:
The Visitor Tracking script, that initializes Clerk.io.
The Order Tracking script that allows tracking of orders in realtime.
These scripts can be found under " Install Clerk.io" in your Getting Started guide, like this:
Visitor Tracking Script:
Your visitor tracking script should be entered either in:
- A tracking script module, and/or
- In your webshop’s main theme file or header file. This is often called something like header.php, fixed.ph p or index.php
Simply copy this from my.clerk.io and paste into the appropriate location in your store, before the closingtag if placed in a theme file.
Order Tracking Script:
The order/sales tracking script should be added either in:
- A tracking script module, or
- In your webshop’s order confirmation page file. This is often a “thank you” page, or something similar, and must be a page only be triggered after the order has successfully processed.
Remember to update the “ORDER_ID” placeholder to the variable used in your store, for example:
Syncing your Webstore with Clerk.io
To show results, Clerk.io must sync with the products, categories, sales, pages and customers from your store. With a custom platform, this requires setting up a JSON Data Feed.
For more information on Clerk.io’s data feed specifications, click here.
Adding Search and Recommendations
Frontend elements in Clerk.io consist of two parts:
A Design that controls the visual presentation of products. This can be changed to match any styling you want. Most often you will use 3 Designs– Instant Search, Search Page and Recommendations.
In my.clerk.io, you’ll also need to create Content with an associated embed code that displays the products. The embed code should be inserted on the page where you want each element to be displayed.
For example, here’s a Recommendations slider embed code added to a Category page:
After adding the desired embed codes to your custom website, Clerk.io should begin working on your store.