Klarna Docs - Best practices

Best practices

Here are some actions you can take to maximise the performance of your integration:

  1. Include the JavaScript Library to your code as early as possible. Add it before any content in the html, right after opening the body tag.
  2. Load the JavaScript Library “asynchronously”. Make sure that the script has the async attribute set.
  3. Avoid using a tag manager.
  4. If your solution relies on templates, make your changes in a central file to ensure placements added to other pages will render.
  5. If you are a Shopify merchant, other apps may influence the performance of On-Site Messaging. Review installed apps to verify they are all still necessary and review all the resources loaded for the page, such as using the browser’s developer tools. You can find further tips here.

Check out our FAQ for further information.