Skip to content

Detailed Documentation

Mojo Web is the first Mobile Browser empowered by Emotions. This documentation covers :

  • How to configure my website
  • How to use the Emotional Browsing Analytics API
  • How Mojo Web works

💡If you are looking for a quickstart guide, check out the Hello World example. Put your hands quickly on the technology and come back here if you want to go deeper.

🛠 How to configure my website

Using Emotional Browsing thanks to Mojo Web is straightforward.

The only thing you need is

☝️   Important file : mojo.json

mojo.json file is the file that defines how Mojo should react to an emotion depending on the current browsing page

3 emotions are available for now:

  • 🤔   confusion
  • 😲   surprise
  • 😊   amusement

13 more incoming ! 🤩

🤓   Let's have a look at what mojo.json looks like

{
  "/": {
    "confusion": {
      "first_content_to_say": "You seem confused !",
      "first_content_to_display": "You seem confused !",
      "additional_content": [
        {
          "title": "Confusion-related Content to discover",
          "description": "Confusion detected",
          "content": "/confused.html",
          "score": 1.0
        }
      ]
},
    "amusement": {
"first_content_to_say": "You seem amused !",
      "first_content_to_display": "You seem amused !",
      "additional_content": [
        {
          "title": "Amusement-related Content to discover",
          "description": "Amusement detected",
          "content": "/amused.html",
          "score": 1.0
        }
      ]
},
    "surprise": {
"first_content_to_say": "You seem surprised !",
      "first_content_to_display": "You seem surprised !",
      "additional_content": [
        {
          "title": "Surprise-related Content to discover",
          "description": "Surprised detected",
          "content": "/surprised.html",
          "score": 1.0
        }
      ]
}
  }
}

🔍   Description

For each path under the root of your website -typically each page-, you can define a reaction to those emotions. Each path has its dedicated JSON section.

Each one of those paths can be given a reaction to any of the emotions.

And each emotion section may be composed of:

  • "first_content_to_say": The sentence Mojo will say when detecting [emotion] on [path] for the first time.

    ⚠️   Important, this sentence will be automatically followed by Mojo asking the question "Do you want additional content on that ?".

  • "first_content_to_display": The sentence to display below Mojo when detecting [emotion] on [path] for the first time.

    ⚠️   Important, this will be automatically followed by the question "Do you want additional content on that ?" and a yes / no button.

  • "more_content_to_say": The sentence Mojo will say when detecting [emotion] on [path] for the second and more time.

    ⚠️   Important, this sentence will be automatically followed by Mojo saying the question "Choose one in the list or go back to the main content.".

  • "more_content_to_display": The sentence to display behind Mojo when detecting [emotion] on [path] for the second and more time.

    ⚠️   Important, this will be automatically followed by "Choose one in the list or go back to the main content." and the list of additional contents will be displayed.

  • "additional_content": This is the list of additional contents Mojo will propose to the user when detecting [emotion]. Each item of this list contains:
    • title : The title that will be displayed in the list proposed to the user.
    • description : A really short description to help your user choose among a list of additional contents.
    • content : The url of the additional content to redirect the user.
    • score : A score to evaluate the relevance of this additional content and help the user make his / her choice.

      ⚠️   Important, the content with the highest score will be the one triggered automatically by Mojo without displaying the list of contents to the user.

📝   To sum up

At first emotion detected, if the user is browsing on a path referencing this emotion, Mojo will show up, say first_content_to_say, display first_content_to_display and propose the user to redirect navigation on additional_content with highest score.

Later if Mojo detects emotion again on path, it will show up, say more_content_to_say, display more_content_to_display and ask the user to select where to be redirected among remaining additional_content.

Mojo shows up after emotion on path as long as there is additional_content remaining ! 👀

📐 Each time the user navigates to an url with a new domain name, MojoWebView application will check if a file <current_domain>/mojo.json exists to load and use it if so. As a consequence, your mojo.json file should be located at the root of your website for the app to find it !

Download HelloWorld.zip for a concrete example

‍💻   How to test locally

  • Once your mojo.json is placed at the root of your website, you can run it locally on your machine.
  • Then, open MojoWebView application on a device connected to the same network as your machine running the website.
  • Navigate through MojoWebView to an url defined as a path in your mojo.json as described above.
  • Express an emotion defined for this path.

🪄 Mojo should appear and propose to redirect you to the additional_content you defined with the highest score.

If you let Mojo redirect you to this additional_content, you'll have a new button available "back to main" to go back to the path you left by expressing emotion.

If you indeed go back to main by using the button or by typing in the navigation bar, play the emotion again :

🪄 Mojo should appear and display the list of additional_content for you to choose if you want.

🚀   How to deploy

Once it is all working properly locally, you can just deploy your website with the mojo.json file at its root and invite your user to visit it through MojoWebView application 🥳.

📈🥰   Emotional Browsing Analytics API

🚧   Coming soon...

⚙️ How it works

🚧   Coming soon...