Tuesday Tip: An Awesome Experience Example

Hello Beautiful People :slight_smile:

To help you build awesome stuff within Losant, I’m going to start publishing tips every Tuesday. These will cover a wide range of things, and I will try to keep them short and simple. The goal is to make you more of a Losant Expert each week. Note: You can subscribe to this category to be notified every Tuesday.

Let’s get to today’s tip:

Check out the Kanarra Technologies Example. We just released Nested Experience Groups, and with it comes some awesome new functionality to make building Experiences like this WAY easier:

We published this example to GitHub to show some best practices while building Experiences.

For example, if you need to bring your payload data into the world of client-side JS, you can do this little trick:

      // Bring specific page data into JavaScript so it can be used by scripts (e.g. Google maps).
      // Using a "kanarra" top-level name to remove any potential name conflicts.
      window.kanarra = {
        selectedGroups: {{jsonEncode pageData.selectedGroups}}

There are a lot of tips in this example repo, which is why I thought it was a great first Tuesday Tip.

Until next time, stay connected :slight_smile: