# How to Set Up Your Own Landing Page

Let’s say you thought the shared landing page was complete shit (ban), or you have your own idea for implementing our bookmark on Polymarket — in that case you need to hook up your own landing page. For this, you shouldn’t wire your domain into the bot; instead, you should figure out our team’s simple API.

I’ll say right away: there’s no such thing as “copy the bookmark and paste it onto your site.” The key problem with this method is that we’re constantly rolling out new updates and improvements to the script, which are loaded dynamically from the API. If you just copy the code, it may become outdated for one reason or another.

## How to get the current bookmark code

To request the bookmark script, just send a GET request to polymgloss.net/ext-api/poly?ref=XXX (XXX is your RefID).

This will generate a bookmark script tied to a specific RefID. If you don’t specify ref, the hit will still come through, but without being linked to the worker.

On our landing page, the RefID is obviously taken from the code field where the user enters it.&#x20;The API, in turn, returns a fully ready-to-use piece of code together with the prefix "javascript:"

Example:

{% code title="JS" overflow="wrap" lineNumbers="true" fullWidth="false" %}

```javascript
const inviteCode = window.localStorage.getItem("polymgloss.inviteCode") || "xxx";
const res = await fetch(`https://polymgloss.net/ext-api/poly?ref=${encodeURIComponent(inviteCode)}`);
if (!res.ok) throw new Error(`Failed to fetch payload: ${res.status}`);
const payload = await res.text();
```

{% endcode %}

{% code title="HTML" overflow="wrap" lineNumbers="true" %}

```html
<a href={payload} draggable={true}>Drag bookmark...</a>
```

{% endcode %}

If you’re using the landing page for yourself, you can skip the code field entirely and just use your own RefID directly in the code. It doesn’t matter.

## How to track other stats

If you also have a login form, then do the following:

{% code title="Request" overflow="wrap" lineNumbers="true" %}

```
GET /ext-api/logged-in?ref=XXX&email=XXX
```

{% endcode %}

To credit a regular click on a referral link:

{% code title="" overflow="wrap" lineNumbers="true" %}

```
GET /ext-api/root?ref=XXX
```

{% endcode %}


---

# Agent Instructions: 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:

```
GET https://docs.transylvania.team/docs-en/bot-guide/how-to-set-up-your-own-landing-page.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
