Klarna Docs - On-site messaging configuration

On-site messaging configuration

Read about configuring On-site messaging in the Klarna Adobe Commerce extension.

To enable the display of Klarna promotional messages in your storefront, perform these steps:

1. In the Adobe Commerce Admin, expand the Klarna On-Site Messaging section.

2. Set Enable to Yes.

3. In the Data client ID field, enter the data-client-id hash value from the code that you copied while in the Klarna merchant portal.

4. Enter the Design theme that you want to apply to Klarna promotional messages. The value, for example, data-theme="dark", can be retreived from the placement code in the Klarna merchant portal.

5. To enable Klarna promotional messaging for product pages, set Enable on product to Yes.

6. To determine the location and style of Klarna promotional messages on the product page, set Product placement to the type of script that you copied from the Klarna merchant portal.

7. The placement value corresponds to the data-key field in the script you chose. For example, the data-key="credit-promotion-badge" value in the code corresponds to the Credit Promotion - Badge option. If you have a customized promotion, choose Other. You will need to provide your own custom script.

8. To enable Klarna promotional messaging for the shopping cart page, set Enable on cart to Yes, and repeat the previous step.

9. When complete, click Save Config.

A screenshot of Adobe Commerce Admin showing On-site messaging configuration in the Klarna extension.

Configure On-site messaging in the Adobe Commerce Admin.

If On-site messaging is enabled, do the following to paste the scripts that you copied from the Klarna merchant portal:

1. In the Adobe Commerce Admin, go to Marketing > DesignConfiguration.

2. In the list, find the store configuration that you want to update and click Edit.

3. Under Other Settings, expand  the HTML Head section.

4. In the Scripts and Style Sheets box, paste each script that you copied from the Klarna merchant portal.

5. Click Save Configuration.