Configuration

Get the widget to look and work as you want It

Last updated 01 Aug 2024

To make the widget look and work as you want it, there are a few configuration options available.

Colors

Currently, Skrym allows you to set the primary and secondary colors of the widget. This is done by going into the Scope admin settings and setting the colors there.

Info

We are working on improving the customization options for the widget to allow for more advanced customization.

Dark mode

There are two ways to decide what theme to use on the widget. You can either set it in the URL or call the setTheme function from the helper script.

The widget supports three themes: light, dark and system. The system theme will use the user's developer.mozilla.org faviconprefers-color-scheme option to decide which theme to use.

Via API

When fetching the widget URL, you can specify the theme. If not specified, the default theme is system.

postapi.skrym.com/tracking.GetWidgetURL

Via helper script

You can also set the theme client-side by calling the setTheme function, available via the helper script. Similar to the API, you can set the theme to light, dark or system. Example usage:


SkrymTrackingWidget.setTheme('dark');

Language

The widget supports multiple languages. Similar to the theme, you can set the language in the URL or call the setLanguage function from the helper script.

Via API

When fetching the widget URL, you can specify the language. If not specified, the widget will check for a user's preferred language or default to english.

postapi.skrym.com/tracking.GetWidgetURL

Via helper script

You can also set the theme client-side by calling the setLanguage function, available via the helper script. Similar to the API, you can set the theme to en or sv. Example usage:


SkrymTrackingWidget.setLanguage('sv');