한국어 한국어   Englilsh English

.

Skip to end of metadata
Go to start of metadata

Client Library API is a javascript library provided to clients operating web services for easy and quick access to RecoPicks services. Client Library API enables direct collection of logs using RecoPicks services, eliminating the need of additional costs for transmitting server logs. Additionally, recommendations can be easily applied using the Widget API included in the Client Library API. Client Library API was carefully designed to minimize its effect on the websites loading speed in order to allow website users to browse without inconvenience.

Loading Library

 

In order to use RecoPick Client Library, you must first insert the following code in front of the </head> tag on the HTML page. You may add RecoPick functions to the code below to use the APIs. Refer to the following information for a more details regarding each API.

<script type="text/javascript">
  (function(w,d,n,s,e,o) {
     w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)};
     e=d.createElement(s);e.async=1;e.charset='utf-8';e.src='//static.recopick.com/dist/production.min.js';
     o=d.getElementsByTagName(s)[0];o.parentNode.insertBefore(e,o);
   })(window, document, 'recoPick', 'script');
 
   // This code is absolutely required. In 'SERVICE_NAME', enter the name of website assigned upon service registration. Example: example.com
   recoPick('service', 'SERVICE_NAME');
   // Add the necessary function here.
   // Example: recoPick('sendLog', 'view', '123');           
</script>

 

The appropriate website address must be used for 'SERVICE_NAME'.

  • For example, enter recoPick('service', 'example.com') with www omitted if the website address is www.example.com.
  • Here, make sure you use the proper capitalizations for recoPick(). (recopick() will not function.)
  • The address of the website must be entered correctly for proper installation of the widget.
  • No labels