experience.config
The main configuration for any Purple Experience is done in a file called experience.config.json. It is located in /storefront/assets within the dynamic content. Any data you put here is available to your app via the Global Data object. As it is part of Dynamic Resources, this configuration is generally also available in offline cases. (Note that a version of this file is bundled with the app. Thus, when downloading and app and accessing it in offline mode, upon first start, it might be outdated.)
The configuration you may place here is generally ubiquitous, and available on any PXP page. So it may also be used to configure custom implementations that are necessary in a project.
Configurations provided by the purple system are defined inside the purple object in the file.
This code snippet will need to be modified according to the needs of the project.
Any new project in PXP will use the revisited version of DOM, called LeanDom. It is already set up in our Boilerplate and also the templates we regularly use.
For SEO and accessibility reasons, we recommend that you set the locale for your website explicitly. You can simply do this by adding, i.e. "language":"de" to the experience.config.json. This will then be added to your website's HTML as <html lang="de">.
Please refer to https://www.w3.org/International/articles/language-tags/ for further information on locales in general.
Most Third-party tracking Systems must be set up in both experience.config and purple manager. For details, see Tracking and Analytics and refer to the detailed steps for the individual trackers. Note that you must set up the tracking config as well, to map events from the purple system to the tracker. This setup allows the changing of trackers with limited adjustments in your tracking logics.
Most Consent Management Platforms must be set up in both experience.config and purple manager. For details, see Consent Management App & Web.