> 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="/files/Hnc4mAMS1ys1ryJqv0ud" 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
