# Abandoned search recovery

In this guide, we'll show you how to use web tracking to see what holidays potential customers are searching and viewing, and how to use journeys to retarget them with personalized offers.

### 1. Add website tracking

{% hint style="info" %}
If you have already installed one of the ecommerce platform integrations, such as [Shopify](https://docs.bird.com/applications/integrations/integrations/supported-integrations/shopify), the web SDK is automatically installed on your store website.
{% endhint %}

The first step to setting up abandoned search recovery is to add tracking to your website. To do this, you'll need to install Bird's [web SDK](https://app.gitbook.com/s/dnJZeZvhOMhDQA8SpjQM/client-sdks/sdk-integration).

With the web SDK installed, you'll be able to:

* Identify visitors
* Track page views
* Track searches

This tracking information will automatically be added to [contact profiles](https://docs.bird.com/applications/audience/contacts/concepts/contact-profiles) and used to create [segments](https://docs.bird.com/applications/audience/lists-and-segments/concepts/segments).

### 2. Create a segment&#x20;

Now that you're capturing search and page view information, you can create a segment to group users that are searching for a specific destination.

To do this:

1. Go to the **Marketing** section of your workspace, then go to **Audience** > **Lists & segments** > **Create new** > **Create new segment**.
2. Then, in the **Segment definition** section, use **Something was or was not done** and select **Page viewed** and **Search submitted** as events.
3. For the **Search submitted** event, you can match the query terms to a specific country search such as 'Bahamas'.

Take a look at the screenshot to see how it's done.

<figure><img src="https://3861485111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU9kiDiTGVD8kkbnKKyEn%2Fuploads%2FEX2yjYrP4ooA5ezGmECl%2Fnew%20segment.png?alt=media&#x26;token=6b49cda2-843e-48db-a161-6bca48b71f46" alt=""><figcaption></figcaption></figure>

**Save** your segment.

{% hint style="success" %}
Visitors to your website who view a specific page or submit a specific search will now automatically be added to the segment.
{% endhint %}

### 3. Build a dynamic email template

Now you can build a dynamic email template with variables.

You can add variables by typing `{{` or clicking the **Add variables** icon, and selecting the variable that you want to use.

For example, you might want to populate the subject line as follows:

* `Ready to book your next {{contact.attributes.interest}} vacation?`

1. Go to **Content** > **Email templates**, and use the drag and drop builder to design an email or set of emails that you want to send to website visitors who have abandoned a search.
2. To personalize the email with information relevant to the destination they were searching for, use variables.
3. **Test** and **Publish** your template so it's ready to send as part of a journey.

{% hint style="info" %}
**Tips**

* Remember to create and publish email templates for every stage of the journey!
  {% endhint %}

### 4. Set up a journey

Next, set up a journey to send your email templates.

1. From the **Marketing** section of your workspace, go to **Journeys** > **Create journey** > **Create from scratch**.
2. For the trigger, use **Added to segment** and select the segment you created in step two. When a contact is added to that segment, the journey will automatically start to run.
3. Next, add a **Wait** step, and set the wait time to s few hours. You don't want to email your customers the second that they view something, as that can be a bit overwhelming!
4. Below the **Wait** step, add a **Send an email** step, then select the first email template you created in step two. Remember to configure any of the variables you added by using the panel on the right-hand side of your screen
5. Repeat this process for the other email templates you have created
6. When you're ready, **Publish** your journey to set it live.

{% hint style="info" %}
**Tips**

* Use **Wait** steps to adjust how long your journey should wait before sending the next email.
* Use **Conditions** to only continue the journey if the customer hasn't completed their booking (see screenshot below)&#x20;
* Add steps to target customers on other channels such as SMS and WhatsApp to increase engagement.
  {% endhint %}

Conditions example:

<figure><img src="https://3861485111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU9kiDiTGVD8kkbnKKyEn%2Fuploads%2FEGB1MdP9QLsSy21gATpn%2Fscreenshot_2024-06-27_at_1.41.19___pm.png?alt=media&#x26;token=ac34c53e-55c3-470f-bce0-eeedacf3c124" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
You've just set up an abandoned search recover journey!
{% endhint %}
