> 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/products/vibe-studio-beta/navigating-players-to-promotion-and-landing-pages.md).

# Navigating players to Promotion and Landing pages

When you are ready with your Landing or Promotional page and are ready to publish it on your own domain, you need to make a few final changes.

## Prepare index.html (needed for Promotions and Landings)

Open the index.html file in the Vibe Studio and place two variables for your label, brand keys, and optionally language

Your final index.html should look like this:

{% code title="index.html" %}

```html
<html>
<head>
...
</head>
<body style="margin:0">
  <div id="root"></div>
  <script type="module" src="/index.tsx"></script>
  <!-- Smartico init: start -->
  <script>
    const _smartico_label_public_key = 'your label key here';
    const _smartico_label_public_key = 'your brand key here';
    const _smartico_language = 'br';
  </script>
  <!-- DO NOT REMOVE SMARTICO_INIT_SCRIPT from this page -->
  %SMARTICO_INIT_SCRIPT%
  <!-- Smartico init: end -->
</body>
</html>

```

{% endcode %}

**Important:** do not remove %SMARTICO\_INIT\_SCRIPT% from the page.

You can skip setting the language in the page and pass it as a parameter, like `index.html?_smartico_language=br`

## Enabling visitor mode (for Landings only)

Be sure you have visitor mode enabled on your label/brand.

Follow the guide in the section **'Enabling Visitor mode in Smartico'** described in the [Visitor mode](/welcome/technical-guides/front-end-integration/visitor-mode.md)

## Passing 'User ID' in the URL (for Promotions only)

You need to pass the user's ID to the promotion page; this way, the page will know which gamification profile to load. The format of the URL should look like the following:

{% code title="" %}

```
https://summer-tournament.mycasino.com/?_smartico_user_ext_id=XXX
```

{% endcode %}

Where XXX is the user identifier in your system aligned with Smartico.

If your user's ID is impossible to guess, as in the screenshot below, this should be enough in most cases.

<div data-with-frame="true"><figure><img src="/files/MgkXECzEsPFL7UVwU875" alt="" width="563"><figcaption></figcaption></figure></div>

Otherwise, you need to enable hash protection logic in Smartico BackOffice and pass the user's hash, calculated on the server side.

### **The user\_hash should be calculated in the following way**

```
const hashValidityTimestampMs = ~~(+new Date() / 1000) * 1000 + 24 * 3600 * 1000;
user_hash = Md5.init((user_ext_id + ":" + "label_salt_key" + ":" + hashValidityTimestampMs).toLowerCase()) + ":" + hashValidityTimestampMs;
```

The label salt key can be retrieved from the label configuration in Smartico BackOffice. The hash validity timestamp specifies the number of milliseconds for which the hash is valid.

Example of calculation:

```
label_key = 3ff6261b-00a7-4137-9906-de7450fd61c9
brand_key = 13d7ff00
user_ext_id = 879978
label_salt_key = demo-salt
timestamp = 1638050700000 // Sat Nov 27 2021 22:05:00 GMT+0000
user_hash = 019b370929095f0cfe6c9b02ea7524a2:1638050700000

```

After calculating the hash, you will need to pass it in the URL

{% code title="" %}

```
https://summer-tournament.mycasino.com/?_smartico_user_ext_id=XXX&_smartico_user_hash=YYY
```

{% endcode %}

### Building a link to the promo page from emails, push, popups, etc

You can build a navigation link as part of any communication channel in the Smartico CRM,

The link should be formed using the following tags:

```
?_smartico_user_ext_id={{state.user_ext_id_clean}}&_smartico_user_hash={{state.user_hash|24}}
```

Pay attention to the parameter "24", it defines how long the hash will be valid. If the mail with such a link is sent to the end user, they will be able to follow it for only 24 hours.

Example of email template with the link:

```html
<div>
Hello user, 
Check your progress in the
<a href="https://summer-tournament.mycasino.com/?_smartico_user_ext_id={{state.user_ext_id_clean}}&_smartico_user_hash={{state.user_hash|24}}"> 
Summer Tournament
</a>
</div>
```


---

# 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/products/vibe-studio-beta/navigating-players-to-promotion-and-landing-pages.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.
