Customise API Request

Sometimes you need a bit more control over what a Klevu Recommendation banner is doing, whether that is dynamically excluding some products or adding some extra context like currency.

You can override any aspect of the API request being made to Klevu, even for a specific Recommendation Banner. For this purpose, we have provided one handy function, klevu_processRECSRecordQueries.

Simply implement this function within your own website code. We recommend adding this immediately after the klevu.interactive code which you use to specify your API Key, etc.

    <script src=""></script>
    <script src=""></script>
    <script type="text/javascript">
        klevu.interactive(function () {
            var options = {
                powerUp: {
                    recsModule: true
                recs: {
                    apiKey: 'klevu-12345'

        function klevu_processRECSRecordQueries(recordQueries, recsKey)
            // Implement your API Request customisation here!

See the below for some usage examples: