Klarna Docs - Install steps

Install steps

The Klarna On-site messaging app is available on the Shopify App Store.

From the app's settings page you can enter your Klarna merchant id.

Note: if applicable, you must accept the Terms of Service within the Klarna Merchant Portal to use this app.  (If your store’s address does not match the automatically connected endpoint, you can disconnect your account and reconnect it to the desired region’s endpoint.)   If you haven't yet integrated Klarna Payments for Shopify, see instructions, see Payments on Shopify as an alternative payment method. If you don’t yet have Klarna API credentials, you can sign up at the Merchant Portal button in the top navigation of this site: docs.klarna.com

If your store is using a theme that support Online Store 2.0 app blocks, you can add Klarna On-site messaging app blocks in your theme customizer.

After inserting the block, drag the SKOSM ‘Klarna Placement’ App Block to the desired location in the template (e.g. below Price).

You can edit the configuration options within the Klarna Placement app block. For further instructions of configuration options, see the App Block instructions from the app's Dashboard.

If your store is using a vintage theme (that does NOT support Online Store 2.0), from the Klarna On-site messaging Dashboard, click the “New Ad Position” button

  1. If desired, enter a name for your Shopify Ad Position or use the default timestamp for the name.
  2. If your country is not already defaulted, select the country that matches your Klarna API credentials. (Make sure to select a country that uses the matching currency for your store.)
  3. The locale is defaulted, but you can set it manually if desired.
  4. Select your desired placement; the dynamic amount-based ‘credit-promotion’ is recommended for Product and Cart pages.
  5. The app will automatically pick a placement it finds as best fit for your theme, but if this doesn't work, you can instead drag and drop the pink box to the desired placement on your page, OR if neither of those options work well for your theme & page, enter a CSS element manually.  
  6. Check the consent box “I have checked the preview...” and click the Save button.
  7. Confirm the modal pop-up window that changes take a few minutes before they will display on your storefront.
  8. Review the On-site messaging at your storefront.
  9. Repeat the above steps for your cart page, and any other pages (home or static) as desired.

Do not add padding or change the alignment, unless necessary.  Before adjusting these settings, check how the Shopify Ad displays on your store by viewing your storefront in a browser.  The Preview shows how the Ad may display but can not render the page exactly as shown in an actual browser session.

Note: you don’t have to code for placements to be updated when variants change on the product page or quantities change on the cart page, this app already included that for you.  

We recommend testing in a new incognito window to avoid caching and waiting a few minutes after changes are made to give the code time to update the storefront.

When using this app, do NOT manually update your store’s theme files with code from the On-site messaging app within the Klarna Merchant Portal, as that will prevent the Shopify On-site messaging app from working.

Problems?  Email skosm@klarna.com for further help.

Most customizations of the look and feel of On-site messaging are done in the Klarna Merchant Portal; these customizations affect the contents within the placement. (Note: The defaulted “Light” theme MUST be selected in the app for the customized placement to display on the storefront; the “Dark” theme will instead use the non-customizable, dark placement.)

A few customizations (Padding & Alignment) affect the placement itself (not the contents within the placement), and these are available in the app in your Shopify admin. Customizations in the app vs. the Merchant Portal impact the placement differently, and both types of customizations may need to be configured for the desired result, e.g. the Merchant Portal placement text alignment (within the placement) and the app Ad Position alignment (for the placement on the page). (Note: only some Klarna placements support text alignment within the placement, and some themes may not honor the styling for placement alignment on the page.)

For Shopify Plus merchants, klarna-placement code can be added within your Shopify checkout theme files to display On-site messaging within checkout. On-site messaging within Shopify checkout is not currently supported within the On-site messaging app.

As of 2021, the app defaults to a dynamic locale configuration option, Geolocation. (Static locale options are still available: 'Manual Locale' for Online Store 2.0 App Blocks, or 'Auto-select' or 'Select locale' with Vintage Ad Positions.) With the Geolocation setting, a single on-site messaging placement can be displayed in a different language based on customer geolocation data. Since a user's country is required for the on-site messaging placement's data-locale, that country is set to the user's geolocation. Based on the supported locales for on-site messaging for that country, the language is chosen (either using the Shopify storefront language or the browser's language, based on the Ad Position's configuration setting) to use for the klarna-placement on-site messaging code injected into the storefront page.

Note: for stores with base currency of EUR, when using locale set to Geolocation, for Klarna On-site messaging using Online Store 2.0 App Blocks, the enabled EURO countries are defaulted, but can be configured within the app's "App Block Instructions" for use for all Klarna On-site messaging App Blocks. For vintage Ad Positions, the enabled EURO within the for each Ad Position.

If the customer's selected language (either the customer's browser language or Shopify language) is not supported for the country, English is used as a fallback. You can review the locale set for the placement in the browser tools -> Elements (but not the HTML source of the page); search for 'klarna-placement'.

To debug app issues or review app functionality, you can optionally add browser console logging for this app by appending "?consoleDebug=true" (or "&consoleDebug=true" if there are already parameters in the URL).