Powered by Smartsupp

Custom Integration

Implementation time : 15 min

Integration process for deployment on custom solutions:

Integrating our autocomplete into your platform is simple and complication-free. You can handle it even without a programmer; however, the ideal solution is for your developer to insert our code only into the shopping cart (checkout) page of the e-shop.


This ensures that the script will not load unnecessarily on pages where it isn't needed, and thus won't burden the e-shop in any way.


Our code is, of course, optimized for speed and performance, yet we recommend this procedure as a best practice. We would appreciate it if you followed it.



Launify Administration:

  1. Register on our website app.launify.com, and then log in to our administration.
  2. Click the Integration -> Create Key button in our administration.
  3. Fill in the key name and the domains that will be allowed to communicate with this key and click Save.
  4. If you already have an API key created, you will see a symbol </> on the right of the row; click on it and copy the code that appears in the pop-up window.

Now you have an API key created that works only on your defined domains, and you have copied the code for insertion into your e-shop.


In your e-shop platform:

Now you need to insert the copied code with the API key into the <head> tag of your e-shop/application.


  1. In your e-shop, add our tracking code to the e-shop header, which you copied in the previous step from our Launify administration.
  2. If the situation allows, we would prefer if you insert the code only into the section where the customer fills in the delivery address. - In this case, our code can be inserted into the HTML template directly below the form and does not need to be inserted into the <head>.
  3. You're done, your e-shop is now connected to our add-on


Sample of our code

Don't forget to replace YOUR_API_KEY_HERE with your API key and set the correct country in updateCountry('CZ'), if you copy this code from here. You can find the list of supported countries here. The code can be minified on your end.

<script>
(function(){
function init() {
if(window.Launify) return;
var s = document.createElement("script");
s.src = "https://cdn.launify.com/launify.min.js?t=" + Date.now();
s.async = true;
s.onload = function() {
try {
var launifyInstance = new Launify('YOUR_API_KEY_HERE');
launifyInstance.updateCountry('CZ'); // here you set the target country of the e-shop in ISO-CODE-2
launifyInstance.init();
} catch(e) { console.error(e); }
};
document.head.appendChild(s);
}
if(document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", init);
} else {
init();
}
})();
</script>


Now it is necessary to set up your form fields (inputs, outputs) for entering addresses, emails, and for listening to results.

Mapping

  1. Click the Integration button in our administration. Scroll down in this section to "Mapping of inputs and outputs".
  2. By default, you already have the first mapping group predefined. You can modify this group according to your needs or add others. You are not limited in terms of numbers.
  3. You can add form inputs by: id, name, class, data-attribute


If you are unsure about mapping inputs, do not hesitate to contact us via chat or email; we will be happy to map everything for you.