# journey

The following `journey` properties are available and are described in more detail in the table below or in their corresponding subsections.

<table><thead><tr><th width="172.43902439024393">Property</th><th width="297.51543845203787">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>config</code></td><td>See the <a href="journey/journey.config"><code>journey.config</code></a> subsection.</td><td></td></tr><tr><td><code>container</code></td><td>See the <a href="journey/journey.container"><code>journey.container</code></a> subsection.</td><td></td></tr><tr><td><code>device</code></td><td>See the <a href="journey/journey.device"><code>journey.device</code></a> subsection.</td><td></td></tr><tr><td><code>diagnostics</code></td><td>See the <a href="journey/journey.diagnostics"><code>journey.diagnostics</code></a> subsection.</td><td></td></tr><tr><td><code>dialog</code></td><td>See the <a href="journey/journey.dialog"><code>journey.dialog</code></a> subsection.</td><td></td></tr><tr><td><code>env</code></td><td><p>Returns an object containing information about the deployment and backend that a user is currently enrolled in. Included fields: </p><ul><li><strong><code>appName</code></strong>: The name of the app.</li><li><strong><code>url</code></strong>: The URL of the JourneyApps Backend. </li><li><strong><code>region</code></strong> (<code>au</code> | <code>eu</code> | <code>us</code>): The region code of the user's deployment.</li><li><strong><code>deploymentName</code></strong>: The name of the user's deployment.</li><li><strong><code>deploymentEnvironment</code></strong>  (<code>testing</code> | <code>staging</code> | <code>production</code>): The environment of the user's deployment.</li><li><strong><code>testing</code></strong> (<code>true</code> | <code>false</code>): Flag indicating that the user is enrolled in a <code>testing</code> deployment.</li><li><strong><code>lastDeployedAt</code></strong>: Timestamp of the last deploy to the user's deployment.</li></ul><p>Note: <code>journey.env</code> was introduced in version <strong>4.85.6</strong> of the JourneyApps Runtime.</p></td><td><p><code>{</code></p><p><code>"url":"https://6351525394c500cc366d38e4.backend.us.journeyapps.com/",</code> </p><p><code>"appName":"Snag List",</code> </p><p><code>"region":"us",</code> </p><p><code>"testing":true,</code> </p><p><code>"deploymentName":"Snag List - Testing",</code> </p><p><code>"deploymentEnvironment":"testing","lastDeployedAt":"2022-11-20T14:47:36+00:00"</code></p><p><code>}</code></p></td></tr><tr><td><code>files</code></td><td>See the <a href="journey/journey.files"><code>journey.files</code></a> subsection.</td><td></td></tr><tr><td><code>hardware</code></td><td>See the <a href="journey/journey.hardware"><code>journey.hardware</code></a> subsection</td><td></td></tr><tr><td><code>leaveApp</code></td><td><p>Programmatically forces the user leave the app. It has the same effect as the user manually leaving the app from the context menu.</p><p><strong>Note</strong>: <code>journey.leaveApp</code> was introduced in version <strong>4.75.0</strong> of the JourneyApps Runtime.</p></td><td><code>journey.leaveApp({keepData: true})</code><br>This forces the user to leave the app.<br>If the <code>keepData</code> parameter is set to <code>true</code>, application data<br>will remain on the device.<br>If set to <code>false</code> application data will be removed.</td></tr><tr><td><code>locale</code></td><td>The code of the current language the user has selected.</td><td><code>var locale = journey.locale;</code><br><code>if (locale == 'en_US') {</code><br><code>dialog("Welcome, English (US) user");</code><br><code>}</code></td></tr><tr><td><code>profiling</code></td><td><p>Can be used in the <a href="../../../get-started/journeyapps-fundamentals/journeyapps-syntax-basics#debug-console">debug console</a> to enable/disable more detailed performance profiling, such as logging all queries and digest cycles together with their duration. </p><p><strong>Note</strong>: <code>journey.profiling</code> was introduced in version <strong>4.85.0</strong> of the JourneyApps Runtime and is automatically enabled for debug builds of Desktop containers.</p></td><td><p><code>journey.profiling.enable()</code> </p><p><code>// Enables profiling. Use disable() to disable profiling again.</code></p></td></tr><tr><td><code>runtime</code></td><td>See the <a href="journey/journey.runtime"><code>journey.runtime</code></a> subsection.</td><td></td></tr><tr><td><code>sensors</code></td><td>See the <a href="journey/journey.sensors"><code>journey.sensors</code></a> subsection.</td><td></td></tr><tr><td><code>server</code> (Deprecated)</td><td><p>The URL of the JourneyApps Backend the user is enrolled in. </p><p></p><p><strong>Note</strong>: <code>journey.server</code> was deprecated in version <strong>4.85.6</strong> of the JourneyApps Runtime. Please use <code>journey.env</code> instead (see above).</p></td><td><code>https://run.journeyapps.com</code></td></tr><tr><td><code>synchronize</code></td><td>Method to force the app to synchronize data to and from the JourneyApps backend.</td><td></td></tr><tr><td><code>theme</code></td><td><p>Method to get or set the current theme. Valid values include <code>light</code> (default) and <code>dark</code>.</p><p><strong>Note</strong>: <code>journey.theme</code> was introduced in version <strong>4.37.0</strong> of the JourneyApps Container.</p></td><td><code>var theme = journey.theme; // Gets the current theme</code><br><code>journey.theme = 'dark'; // Sets a new theme</code></td></tr><tr><td><code>viewStack</code></td><td>See the <a href="journey/viewstack"><code>journey.viewStack</code></a> subsection.</td><td></td></tr></tbody></table>
