To make On-site messaging work, you have to add some code to your website.
To make on-site messaging work, you have to add two types of code snippets to your website's source code:
Although the exact way you edit your website may differ depending on your e-commerce solution, the steps described below are valid for all websites.
In the Merchant portal go to On-site messaging.
Select a Store from the drop-down, then click Get started.
You'll be redirected to the Installation section where you can find all your snippets.
Next, make sure to select the right Region from the drop-down list.
Insert the copied snippet in your website's source code right after the opening
Note that the code snippet shown here is only an example of where to place the script. You have to copy your own script from the Merchant portal.
You can get the tag through the Merchant portal. Go to On-site messaging and click Placements. You'll see all the placements available for your configuration.
If you're promoting Klarna in multiple countries use the Region & Country dropdowns to view the relevant placement for each country.
You can also check the tags out in the Placements section of our documentation.
If you're testing your integration in the test (playground) environment, a TEST DRIVE badge appears on each placement.
Find the placement you want to add to your website, then click Copy to clipboard.
The numerical values in the placement preview are placeholders and aren't representative of the true values you see in a live integration.
You can now add the copied tag to the desired location on your website.
Note that the code you can see here is an example. When integrating, you have to copy your own placement tags from the Merchant portal as they're generated specifically for your configuration.
You're now ready to publish the messaging to your site. Before the go-live, you can also customize the content to match your store's look and feel.
Something doesn't look quite right? Check out our troubleshooting guide for solutions to some frequent integration errors.