Skip to main content
All CollectionsTracking Implementation
Troubleshooting the tracking implementation
Troubleshooting the tracking implementation

How to verify that the tracking script and conversion tags are fired correctly

Hanna Mattsson avatar
Written by Hanna Mattsson
Updated over a week ago

Here is a step by step that you can go through to see what may be missing. To be able to use this guide you need to know how to use the developer toolbar. In Chrome you can access it by pressing CMD + ALT + I simultaneously. In Safari you need to first make it available by going to the Safari -> Preferences -> Advanced and check the box at the bottom (see image). All examples will be using the Chrome developer tools, but they are quite similar.


Make sure the script is being included on site

Go to the store website and open the developer tools menu. Click on the tab "Elements" and press CMD + F to activate the search and type "conversion.klarnaservices.com/kc.js" in the field.

You shall then be able to see the script in the code:

<script type="text/javascript" defer="" src="https://conversion.klarnaservices.com/kc.js"></script>

This verifies that the script is in place. The next thing is to check whether the tracking id is being saved when traffic from Klarna Creator is being received. To test this you can make up a tracking id (mock-cookie) which does not exists, since this is just for testing the integration.

Test the tracking script using a mock cookie

On the store website, add a parameter to the main url like this. If the store website is https://somestore.com add this ?caprl=cid-123456789 so it ends up looking like this https://somestore.com?caprl=cid-123456789 and copy paste it into the address bar of the browser. Hit ENTER. We are now mocking a click id that we will use to trigger the script and verify that part of the implementation.

Now go into the developer toolbar again, but this time click on the "Applications" tab and select the store domain under "Cookies" on the menu to the left. Then type "caprl" in the search bar above the cookie to filter out the cookies on your domain. The "caprl" cookie should be visible with the value you typed in the url parameter.


If you see the script and get a cookie assigned you have cleared step one of the implementation.

Test the tracking on the conversion page

Next step is to test that the script is triggered on the conversion page. Continue to make a purchase on your site (with the mock-cookie saved) but remember to keep the developer tools open when you do the purchase so it is logging the network activity.

When the confirmation page has been loaded go to the "Network" tab. Filter on traffic to "klarnaservices" and it should look similar to the screenshot below. Please note, in below image we search for apprl.com which is our old script, but result as reference is the same.

If this is what it looks like (giving you the conversion tags as result) you can send the sread.js string to your contact-person for verification.


Verifying the variables from the conversion

If you are still having trouble click in the "Elements" tab again and this time search for "APPRL" as shown in the images. Adding the fields as numbers or strings are optional, if you are unsure just make them all strings. The only thing to keep in mind is to not try and declare variables such as currency as non strings since they can never be anything but.

The optional variables price, sku and quantity all need to be strings.

Here you should look for the object being initialized with proper values and making sure that the section is properly placed before the apprl.js script is loaded. This is what is looks like when not using the Google Tag Manager to load variables.

Please note that depending on what kind of link has been used, there can be a 400 error code with the message: Invalid order request parameters: Order is invalid {'caprl': ['Invalid formatting of click identifier’]}

This is if the cookie/click-id provided with the link is a mock value, so it will not match with a click from our database.

Rest assured, we can still verify the scripts being fired and the parameter data sent even if this error appears (error will not appear when real clicks start coming through the links when your store is live with the platform).

Verifying the variables from the conversion when using GTM

If you are using the Google Tag Manager you load the variables into a the dataLayer kontext variable, it should look similar to this.


Did this answer your question?