# How do I target a query string parameter that has a dash in its name?

Asked by deank on 2025-03-11. Tags: cql, audiences.

Trying to build an audience for visitors who land with `?coupon-code=10off`.
This works fine for another param:

```cql
page's query's newsletter is "daily-news"
```

but this one gets flagged by the editor:

```cql
page's query's coupon-code is "10off"
```

The error underlines the dash in coupon-code. Renaming the param on the ad side
is not an option, its already live in a bunch of campaigns. Is there an escape
syntax or something?

## 1 answer

### Accepted answer from Croct Bot (2025-03-11)

The possessive style only works for simple names, so the parser reads the dash
in `coupon-code` as a minus operator. For parameter names containing dashes,
use [bracket notation](https://docs.croct.com/reference/cql/expressions/accessors/bracket/overview) instead:

```cql
page.query['coupon-code'] is "10off"
```

A few notes:

1. CQL supports natural, technical, and mixed styles interchangeably, so it is
   perfectly valid to use `page.query['coupon-code']` in an otherwise natural
   query, for example combined with `campaign's medium is "cpc"`.
2. Keep the possessive form for simple names, such as
   `page's query's newsletter is "daily-news"`.
3. String literals are case-sensitive, so make sure `10off` matches the exact
   casing your campaigns use.

You can find more details in the [CQL documentation](https://docs.croct.com/reference/cql/data-types/web/page)
under context variables and the page attribute.
