> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://regiostech.crisp.help/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).

# Applying Discounts Based on Landing Page URL

Regios Discounts lets you create discounts that only apply to visitors who arrived on your store through a specific link. For example:

* 10% off for visitors who came from your Google Ads
* Free shipping for visitors who clicked a link in your newsletter
* 15% off for visitors who landed on your summer sale collection page

This works by checking the **landing page URL**: the first page of your store the visitor opened. Add a UTM tag (like `?utm_source=google`) to the links in your ads or emails, and the discount can check for it.

**This requires the Discounts Embed to be enabled in your theme.** Landing page URL conditions are available in the [Line Item Property discount type](/en/article/line-item-property-discounts-1m9i0kh/).

## Option 1 - Use a Template

1. On the home screen of the app, click "Create discount."
2. Scroll down to "Advanced discount types" and click "Line item property."
3. Give your discount a title, and choose "Automatic discount" or "Discount code."
4. Click "Edit logic."
5. In the "Get started with our logic builder" modal, select "Select a template," then click "Next."
6. Search for "visitors" and choose one of these templates:
   * **Discount for Google Ads visitors**
   * **Discount for social media ad visitors** (Facebook and Instagram)
   * **Discount for email subscribers' clicks**

![Screenshot of the landing page URL templates](https://storage.crisp.chat/users/helpdesk/website/-/d/1/3/e/d13e90de659a8800/image_1lptedc.png)


7. Click "Choose template." Then click "Edit criteria" to change the values, or edit the discount amount.

## Option 2 - Add criteria to an existing discount logic flow

1. Open your Line Item Property discount and click "Edit logic."
2. Find a "Check if" step and click "Edit criteria."
3. Click "Add criteria." Under "Customer," choose one of these:
   * **Landing page URL**: start from scratch
   * **Came from Google Ads**: matches `gclid=` or `utm_source=google`
   * **Came from Facebook/Instagram ads**: matches `fbclid=`, `utm_source=facebook`, or `utm_source=instagram`
   * **Came from an email campaign**: matches `utm_medium=email`

![Screenshot of the landing page URL options in the "Add criteria" menu](https://storage.crisp.chat/users/helpdesk/website/-/d/1/3/e/d13e90de659a8800/image_1y0ua0s.png)


4. Choose how to compare ("Contains," "Equals," "Starts with," etc.), then add one or more values. The condition passes if the landing page URL matches any of them.

![Screenshot of a landing page URL condition](https://storage.crisp.chat/users/helpdesk/website/-/d/1/3/e/d13e90de659a8800/image_1mqcrxw.png)


## What the landing page URL looks like

The value your condition checks is the **path and query** of the landing page, exactly as it appeared in the visitor's browser. It doesn't include your domain or anything after a `#`.

For example, if a visitor clicks `https://yourstore.com/collections/sale?utm_source=google&gclid=abc123`, the landing page URL is:

```
/collections/sale?utm_source=google&gclid=abc123
```

Keep these in mind when choosing values:

* **Use "Contains" for tags.** "Contains `utm_source=google`" matches no matter which page the link points to or what other tags it has.
* **Special characters are encoded.** Spaces appear as `%20` or `+`, and accented characters are encoded too (for example, `/products/café` becomes `/products/caf%C3%A9`). Write your values the same way they appear in the link.
* **Translated stores include a language prefix.** A French visitor's landing page may be `/fr/collections/sale`, so prefer "Contains `/collections/sale`" over "Starts with `/collections/sale`."
* **Comparisons are not case-sensitive.** `UTM_SOURCE=Google` matches `utm_source=google`.
* **Only the first 500 characters are recorded.** Tags at the very end of an extremely long link may be cut off.

## How the landing page is recorded

* The Discounts Embed saves the landing page in a cart attribute named `_regios_landing_page_url`. It only does this while at least one of your discounts uses a landing page URL condition.
* **The first landing page is kept.** If the visitor leaves and comes back later through a different link, the original landing page stays until their cart is completed or expires. A new cart records a new landing page.
* It works with discount codes too: a code entered at checkout still sees the landing page from when the visitor arrived.
* The landing page appears on the order in your Shopify admin under "Additional details." Shoppers don't see it in the cart or at checkout.

## Important: landing page URL discounts aren't tamper-proof

The landing page is stored in a cart attribute, and cart attributes can be changed by anyone visiting your store, for example with their browser's developer tools. A determined shopper could make it look like they arrived from your Google Ads or newsletter even if they didn't.

Treat these discounts like a public promotion rather than a private offer:
* **Keep the discount amount modest.** Don't use landing page URL conditions for deep discounts you wouldn't be comfortable giving to anyone.
* **Cap the discount.** Consider [setting a maximum discount amount per order](/en/article/how-to-set-a-maximum-discount-amount-per-order-ju4o1h/).
* **For private offers, use a discount code instead.** Unique codes, or a code limited to specific customers, are much harder to abuse.

## Testing

On the Test page, enter a landing page URL such as `/collections/sale?utm_source=google` in the "Landing page URL" field to see whether the discount applies.

![Screenshot of the "Landing page URL" field on the Test page](https://storage.crisp.chat/users/helpdesk/website/-/d/1/3/e/d13e90de659a8800/image_1cs4vt6.png)


## Limitations

* **Organic search and other untagged links can't be detected.** Visitors from regular Google search results, or links without a tag, don't carry anything in the URL that identifies where they came from. Use tagged links (UTM tags, Google Ads auto-tagging, or Facebook's `fbclid`) for anything you want to target.
* **Landing page URL conditions count toward the limit of 2 cart attributes per discount.**
* **Headless storefronts** don't run the Discounts Embed, so the landing page isn't recorded.

## Have any feedback for us?
We want to hear about your experience with our app! [Leave a review on the Shopify App Store](https://apps.shopify.com/regios-automatic-discounts#modal-show=ReviewListingModal).