> For the complete documentation index, see [llms.txt](https://help.smartico.ai/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.smartico.ai/welcome/technical-guides/front-end-integration/visitor-mode.md).

# Visitor mode

Visitor mode allows you to show gamification content to non-logged-in users.

You can use it on your main site, at the point when the user is not logged in yet, or to use it on the landing pages to present gamification content or to give [mini-games in the visitor mode](/welcome/products/mini-games/mini-games-on-the-landing-pages.md)

#### Enabling Visitor mode in Smartico

For each brand managed under your label, you must specify the player that the Visitor mode will operate on behalf of.

This is necessary because Smartico gamification blocks always function within the context of a specific player.

**To activate Visitor mode:**

* Create a test player for each of your brands.
* Ensure that any gamification blocks restricted by segments include this test player in the relevant segments.
* Provide the ID of these players to Smartico Support or Success Manager. You can do that over JIRA or in the technical chat that you have with the Smartico teamThe

Smartico team will set up the provided Player ID(s) for each brand in the "Brand settings"

{% hint style="info" %}
Visitor mode activation is needed for mini-games on landing pages and also for the [Visitor API](https://expo.smartico.ai/visitor_api/visitor_api_intro)
{% endhint %}

<figure><img src="https://77049817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfS5hl0PiysHtKAKMsQTe%2Fuploads%2Fgit-blob-eab3c6879a51cf9881e770d5d5624a3cfa5037f0%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Setting up Smartico scripts

**Place the Smartico script on the&#x20;**<mark style="color:red;">**landing page**</mark>**&#x20;by adding the following code**

```javascript

<script>
(function(d, r, b, h, s){h=d.getElementsByTagName('head')[0];s = d.createElement('script');s.onload=b;s.src=r;h.appendChild(s);})
(document, 'https://libs.smartico.ai/smartico.js', function() {
    _smartico.initVisitorMode('_label_key_', { brand_key: '_brand_key_', lang: 'DE' });
});
</script>

```

* Replace `_label_key_` with the appropriate label key.
* Replace `_brand_key_` with the brand key relevant to your landing page.
* Set `lang` to the 2-symbol ISO 639-1 language code.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.smartico.ai/welcome/technical-guides/front-end-integration/visitor-mode.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
