# URL Mapping Guide

**Feature flag**: <mark style="color:$success;">redirect\_url\_override</mark>\
**Availability**: Premium feature, may require additional payment

URL Mapping lets you send users to different final landing pages depending on the ad link that triggered the AI reply.

It is useful when one AI agent or one Offer should support multiple ads, campaigns, or landing pages without creating a completely separate setup for each one.

![](/files/vl2QQ0zM9tq6xdYbA1EB)\
Only the fields relevant to URL Mapping are highlighted in this example.

**Figure 1**. Offer setup example: <mark style="color:$success;">Target URL</mark> is used for Offer selection, while <mark style="color:$success;">Pattern</mark> and <mark style="color:$success;">Final Redirect URL</mark> are used for URL Mapping.<br>

***

### **How it works**

There are **two separate steps** in the logic:

#### Step 1 — Offer selection

The system first decides **which Offer should be used.**

For this, it compares the **ad link** with the Offer’s **Target URL.**

* If a matching Offer is found, that Offer is selected.
* If no Offer matches, the system falls back to the **Default Offer.**

#### Step 2 — URL Mapping redirect &#x20;

After the Offer is selected, the system checks that Offer’s **URL Mappings.**

* If a mapping pattern matches the ad link, the user is redirected <mark style="color:$success;">to the mapped Final Redirect URL</mark>&#x20;

If no mapping matches, the user is redirected to the Offer’s **Target URL.**\
\
![](/files/gG6QsidaZ8n5o2lFhLOl)

**Important**: <mark style="color:$success;">Target URL</mark> selects the Offer. <mark style="color:$success;">URL Mapping</mark> does not choose the Offer — it only affects the final destination after the Offer has already been selected. \
\
**Figure 2**. The system first selects the Offer by Target URL, then checks URL Mapping, and finally uses either the mapped Final Redirect URL  or the Offer’s Target URL.\ <br>

***

### Single Offer setup<br>

#### When to use

Use this setup when:

* one Offer is linked to the AI agent
* you want different ads to lead users to different landing pages
* the AI response can stay the same, while the final destination depends on the ad link

#### How it works

You can add multiple URL Mappings inside the same Offer.

Each mapping follows this rule:

**If the ad link matches a pattern → redirect to the mapped Final Redirect URL**

If none of the mappings match, users are sent to the Offer’s Target URL.

#### Configuration

* **Target URL** → fallback landing page
* **URL Mappings** → one or more mapping rules
* **Pattern** → part of the ad link used for matching
* **Final Redirect URL** → final landing page used when the mapping matches\
  \
  ![](/files/SBM1KrwIw8Yy1Tu3teSv)

#### Example

**Offer**

* **Target URL**: <mark style="color:$success;"><https://shop.com/default></mark>

**Mappings**

* If the ad link contains <mark style="color:$success;">shop.com/shoes</mark> → redirect to <mark style="color:$success;"><https://landing.com/shoes-sale></mark>
* If the ad link contains shop.com/bags → redirect to <mark style="color:$success;"><https://landing.com/bags-sale></mark>

**Result**

* shoes ad → shoes-sale page
* bags ad → bags-sale page
* everything else → Target URL

#### Note

In some surfaces, the preview may not reflect the final mapped redirect URL. To validate URL Mapping, check the actual destination after click.

<br>

***

### Multi-Offer setup

#### When to use

Use this setup when:

* multiple Offers are linked to the AI agent
* different Offers are already used for different products, domains, or AI contexts
* you also want custom landing pages inside each Offer

#### How it works

The system first selects the correct Offer based on the ad link and the Offer’s **Target URL**.

After the Offer is selected, the system checks that Offer’s **URL Mappings.**

If a mapping pattern matches the ad link, the user is redirected to the mapped **Final Redirect URL**.

If no mapping matches, the user is redirected to the selected **Offer’s Target URL**.

![](/files/llreknomm7froNL5P4ks)\
**Figure 3**. In a Multi-Offer setup, the AI agent can use multiple **Offers**, while the **Default Offer** is used as a fallback.\
\
**Configuration per Offer**

* **Target URL** → must match the ad link closely enough for the Offer to be selected
* **URL Mappings** → usually one mapping per Offer
* **Pattern** → usually based on the same ad link / URL family as the Target URL
* &#x20;**Final Redirect URL** → final landing page used after the mapping matches\
  \
  ![](/files/3MWdwze0sc9GX44iM54u)\
  \
  **Figure 4**. Example of mapping fields inside one Offer in a Multi-Offer setup. <mark style="color:$success;">Target URL</mark> is used to select the Offer, while <mark style="color:$success;">Pattern</mark> and <mark style="color:$success;">Final Redirect URL</mark> control redirect behavior after the Offer has been selected.<br>

#### Why usually one mapping per Offer

In a regular multi-offer setup, one Offer usually represents one specific product, flow, or ad family.Because of that, only one mapping is typically needed for that Offer.

#### Default Offer exception

The **Default Offer** is used when no regular Offer matches.Because it acts as a fallback, it may contain multiple URL Mappings to route unmatched traffic to different landing pages.

#### Note

In some surfaces, the preview may not reflect the final mapped redirect URL. To validate URL Mapping, check the actual destination after click.<br>

***

### Can any Offer be a Default Offer?

Yes.

Any Offer can be set as the **Default Offer.**

Recommended setup:

* make sure the Offer has its own valid **Target URL**
* if needed, add one or more **URL Mappings** for fallback routing\ <br>

***

### Matching behavior

#### Target URL matching

Offer selection depends on the Offer’s **Target URL.**

In practice, matching may be sensitive to important URL differences such as:

* protocol differences (<mark style="color:$success;">http</mark> vs <mark style="color:$success;">https</mark>)
* path differences (/<mark style="color:$success;">apps</mark> vs /)
* other meaningful URL structure differences

If the Target URL does not match closely enough, the system may select the **Default Offer** instead.\
\
![](/files/baOYd6GFn0H25W1C2MiB)\
**Figure 5**. Example of Target URL matching behavior. Small but important URL differences may affect Offer selection.\
\
\
**Query parameters**

Additional query parameters may still allow the correct Offer to be selected when the main URL and path are the same.

This includes cases such as:

* UTM parameters
* other ad-related query parameters

Example:

* **Target URL**: <mark style="color:$success;"><https://site.com/apps></mark>
* Ad link: <mark style="color:$success;"><https://site.com/apps?utm\\_source=fb\\&utm\\_campaign=test></mark>

\
\
This ad link may still match the same Offer.

![](/files/rOuqYNYaw5sB9kYm7jC6)\
\
\
**URL Mapping pattern matching**

After the Offer is selected, the system checks whether the ad link matches any mapping **Pattern**.

If a Pattern matches, the corresponding **Final Redirect URL** is used.\
If no Pattern matches, the user is sent to the Offer’s **Target URL.**

#### Practical note

In tested scenarios, URL Mapping patterns behaved like partial string matches rather than strict exact full-URL matches. However, exact implementation details may depend on the current system logic.

<br>

***

\
\
Preview behavior

In some surfaces, such as Facebook comment replies, the preview card may not always display the final mapped redirect URL.

For example:

* the preview may still show the original Offer or shortlink metadata
* but the actual click may redirect the user to the mapped **Final Redirect URL**

Because of this, preview alone is not enough to validate URL Mapping.

To verify URL Mapping correctly:

* click the actual link
* check the final destination after redirect
* do not rely only on the preview card

***

### Quick reference

**Single Offer**

* one Offer
* many URL Mappings possible
* use when one AI flow should route different ads to different landing pages

#### Multi-Offer regular Offer

* one Offer per flow / product / context
* usually one URL Mapping per Offer
* the Offer must first be selected by Target URL

#### Multi-Offer Default Offer

* fallback Offer
* may contain multiple URL Mappings
* used for unmatched traffic

***

### One-line summary

Target URL selects the Offer. URL Mapping decides the final redirect after the Offer is selected.

\ <br>


---

# 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://help.reengage.ai/features/url-mapping-guide.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.
