> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.thewhiterabbit.app/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Unpack method: install the campaign on your hosting

The White Rabbit (TWR) Unpack method filters visits through a PHP file installed on your hosting, with no redirect. You enter the Safe Page and Offer Page URLs, download the file TWR generates, and install it on a site dedicated to it. That site's address is what goes in your ad.

${youtube}[](4y1dGdjE4G0)

## Before you start

- A domain connected to TWR, which generates the campaign's PHP file. See [how to connect your domain](https://help.thewhiterabbit.app/en/article/how-to-connect-your-domain-to-the-white-rabbit-1w0mb1i/).
- Hosting that runs PHP, with a site to receive the campaign file.
- Your Safe Page and Offer Page published, each with its own URL. To build the Safe Page, see [how to create and publish your Safe Page with AI](https://help.thewhiterabbit.app/en/article/how-to-create-and-publish-your-safe-page-with-ai-1ypc1he/).

## The two Unpack domains

| Domain | Role | What it needs |
| ---- |
| **Domain in TWR** | Generates the PHP file. Never shows in the ad. | Subdomain and `CNAME` validated |
| **Hosting domain** | Receives the `index.php`. It's the ad URL. | A site on your hosting that runs PHP |

||| Never use the same domain for both roles. With each one in its place, the ad domain has no link at all to TWR.

## Step by step

### 1. Open Campaigns and click New campaign

In the side menu, click **Campaigns** and then **New campaign**.

![](https://storage.crisp.chat/users/helpdesk/website/-/4/d/7/d/4d7d7d2dfaedd800/01-nova-campanha_4gmvqs.gif)

### 2. Name the campaign and choose the domain

In **Campaign name**, use any name you like. In **Domain**, select the domain connected to TWR. It's only used to generate the PHP file.

![](https://storage.crisp.chat/users/helpdesk/website/-/4/d/7/d/4d7d7d2dfaedd800/02-nome-dominio_7qwa9a.gif)

### 3. Choose the traffic source

In **Traffic source**, select the platform where you'll advertise. The available sources depend on your [subscription plan](https://help.thewhiterabbit.app/en/article/how-our-plans-and-upgrades-work-1almf18/). The setup is the same for all of them.

![](https://storage.crisp.chat/users/helpdesk/website/-/4/d/7/d/4d7d7d2dfaedd800/03-fonte-trafego_12otas4.gif)

### 4. Select your ad's countries and devices

Select the **countries** and **devices** that match your ad targeting. If you advertise worldwide and on all devices, select them all.

![](https://storage.crisp.chat/users/helpdesk/website/-/4/d/7/d/4d7d7d2dfaedd800/04-paises-dispositivos_a68lo1.gif)

||| Only the selected countries and devices can reach the Offer Page. Everything else goes straight to the Safe Page.

### 5. Select the Unpack delivery method

In the **Safe Page** and **Offer Page** blocks, select **Unpack** under **Delivery method**. Unlike the other methods, Unpack doesn't generate a campaign URL: it generates a PHP file for you to install on your hosting. See [TWR's delivery methods](https://help.thewhiterabbit.app/en/article/understand-twrs-delivery-methods-1sjeswz/).

![](https://storage.crisp.chat/users/helpdesk/website/-/4/d/7/d/4d7d7d2dfaedd800/05-metodo-unpack_1iadmkw.gif)

### 6. Enter the Safe Page URL

In the **Safe Page** block, under **Safe Page URL or file**, paste the URL of the page shown to unwanted visits, such as bots and spy tools. It must cover the same subject as your offer and follow the ad platforms' policies.

![](https://storage.crisp.chat/users/helpdesk/website/-/4/d/7/d/4d7d7d2dfaedd800/06-safe-page_1rqr53i.gif)

### 7. Enter the Offer Page URL

In the **Offer Page** block, keep **Offer type** on **Single Offer** and, under **Offer Page URL or file**, paste the URL of the page shown to qualified traffic. If you use a [tracking tool](https://help.thewhiterabbit.app/en/article/how-to-integrate-the-white-rabbit-with-any-tracking-tool-1ifte8i/), paste its redirect URL here. To split traffic across several Offer Pages, switch to **A/B Storm**: see [how to A/B test offer pages](https://help.thewhiterabbit.app/en/article/how-to-ab-test-offer-pages-in-the-white-rabbit-ginv8f/).

The page opens on the ad address, with no redirect, the same way as with TWR Mirror. If it relies on features locked to its original address, such as a checkout, a video player, or a domain-restricted script, check the result in the step 12 test before launching your ad.

![](https://storage.crisp.chat/users/helpdesk/website/-/4/d/7/d/4d7d7d2dfaedd800/07-offer-page_9himoi.gif)

|| Pages entered by URL need no DNS setup at all. The only domain connected to TWR is the one that generates the PHP file.

### 8. Turn on the Unique Token (optional)

Click **Show advanced options**, turn on the **Unique Token**, and confirm. It adds a random password to the campaign parameters, an extra layer of protection that needs no additional setup.

![](https://storage.crisp.chat/users/helpdesk/website/-/4/d/7/d/4d7d7d2dfaedd800/08-token-unico_s17arq.gif)

|| Next to the Unique Token you'll find the **Spy URL**: a page shown only to people trying to spy on your campaign. Just enter its URL, with no DNS setup. It isn't available for every traffic source yet. See [how to monitor who is spying on your campaign](https://help.thewhiterabbit.app/en/article/how-to-monitor-who-is-spying-on-your-campaign-in-the-white-rabbit-spy-17owmmq/).

### 9. Save the campaign and download the PHP file

Click **Save**. TWR shows the campaign **parameters**, which go in your ad together with the site URL (step 11). Click **Download PHP**.

![](https://storage.crisp.chat/users/helpdesk/website/-/4/d/7/d/4d7d7d2dfaedd800/09-salvar-baixar-php_1c1s3l5.gif)

### 10. Upload the file as index.php to your hosting

On your hosting, open the file manager of the site that will receive the campaign and upload the PHP file to the public folder (usually `public_html`). This site holds only the campaign file.

![](https://storage.crisp.chat/users/helpdesk/website/-/4/d/7/d/4d7d7d2dfaedd800/10-subir-index-php_1i21brx.gif)

||| The file must be named exactly `index.php`. If you downloaded it more than once and your computer added a number to the name, rename it.

### 11. Add the URL and parameters to your ad

The ad URL is the **address of the site where you installed `index.php`**, always with `https://`. Paste it into your traffic source together with the parameters TWR generated:

* Most sources have one field for the **destination URL** and another for the **URL parameters**. Use each one in its own field.
* If the source has no field for parameters, append them to the URL with `?` (e.g. `https://www.yourdomain.com/?parameters`). Both ways work, but prefer the dedicated field when there is one.
* If you use your own tracking parameters, join them to TWR's with `&`, no spaces and no second `?`.

![](https://storage.crisp.chat/users/helpdesk/website/-/4/d/7/d/4d7d7d2dfaedd800/11-url-parametros_jvlw61.gif)

||| Use the parameters exactly as generated. Changing any character breaks TWR's filtering.

### 12. Test the campaign

If you open the site URL directly in your browser, TWR treats it as a visit from outside the ad and shows the Safe Page. To see the Offer Page, open the campaign, click **Test Offer**, copy the test parameter, and add it to the URL after `?`. The Offer Page opens on the same address, with no redirect.

![](https://storage.crisp.chat/users/helpdesk/website/-/4/d/7/d/4d7d7d2dfaedd800/12-testar-offer_aor5p6.gif)

When you're done, turn test mode off. It only enables the test parameter and doesn't affect the campaign, so you can test even with your ad running. More details in [how to test if your campaign is set up correctly](https://help.thewhiterabbit.app/en/article/how-to-test-if-your-campaign-is-set-up-correctly-1rd6k36/).

## When to update the PHP file

Download the PHP again and replace `index.php` on your hosting when you:

* change the campaign **domain**;
* change the **Safe Page** URL in the campaign.

You don't need to update it when you:

* change the **Offer Page** URL or link an A/B test;
* edit the content of your pages without changing their URL.

Your ad parameters only change if you turn the **Unique Token** on or off. In that case, copy the new parameters and update them in your ad.

To run this same campaign in other ad accounts, see [how to scale the same offer across multiple ad accounts](https://help.thewhiterabbit.app/en/article/how-to-scale-the-same-offer-across-multiple-ad-accounts-1tcvmc4/).

## Install the PHP alongside your pages (optional)

If you have access to the Safe Page or Offer Page files, you can install `index.php` in the same folder as them and enter the file path instead of the URL. With everything on the same hosting, this is the most compatible way to use Unpack. See [Unpack method: install the PHP alongside your pages](https://help.thewhiterabbit.app/en/article/unpack-method-install-the-php-alongside-your-pages-j35q6j/).