Implementation Methods – Client vs Server
A key decision to make before you begin the implementation is whether you are going to use the client-side or server-side integration approach. If you are using a plugin developed by PureClarity for your e-commerce platform then this is not relevant to you. Refer to the documentation for your plugin. Regardless of the approach taken you will need to generate and send the data feeds to PureClarity. These tell PureClarity about the products on your site, as well as historic orders and your customers. Once PureClarity has information about your ecommerce store you will need to decide how your store will communicate with PureClarity. “Client-side” is the approach to take in almost all circumstances. In this mode you will “mark up” areas on your site where you want PureClarity to show content. You will need the PCJS Master Function on your site. This Javascript will be responsible for examining the page and injecting the relevant content into any zones that are on the page. It will also handle sending tracking events to PureClarity to record the activity of the users. For some implementations the approach of letting PureClarity render all HTML is not viable, or doesn’t give enough control over what is displayed to users. For example if the pricing of products is custom per user and has very complex logic, or if some products cannot always be shown to some users, then you may want PureClarity, for example, to return recommender data to your server, where you are more in control of the product display. For complex situations like this you can use our “server-side” approach. At this point it is worth pointing out that because of our callback feature – there are very few situations where server-side is the correct approach. We advise you to contact our support team before embarking on a server-side implementation if you have any questions. In a “server-side” implementation your ecommerce system will make calls directly to PureClarity – often before a page is loaded. You will be responsible for building HTML from the results PureClarity returns. Server-side allows you to potentially integrate PureClarity into your existing pipelines – for example feeding the JSON results into your own templating system. The drawbacks of server-side:- More code intensive – may take longer to implement
- Increased latency on initial page load
- You can’t use the PureClarity templating system for data returned server-side
- You have to handle setting client cookies, and other variables, so PureClarity can identify the customer and ensure a customer falls into the correct segment.
