> For the complete documentation index, see [llms.txt](https://ios-docs.adster.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ios-docs.adster.tech/additional-features/how-to-pass-predefined-custom-targeting-values-in-ad-request.md).

# How to pass predefined custom targeting values in ad request

Create your `AdSterAdLoader` as per the below format

```swift
let loader = AdSterAdLoader()
loader.delegate = self
loader.loadAd(adRequestConfiguration: AdRequestConfiguration(
    placement: "placement_name",
    viewController: self,
    customTargetingValues: ["test": "123"]
))
```

<details>

<summary>Single key with single value</summary>

```swift
customTargetingValues: ["test": "123"]
```

</details>

<details>

<summary>Single key with multiple values</summary>

```swift
customTargetingValues: [
    "city": ["BANGALORE", "PUNE", "MUMBAI"]
]
```

</details>

<details>

<summary>Multiple keys with single value</summary>

```swift
customTargetingValues: [
    "test1": "123",
    "test2": "324"
]
```

</details>

<details>

<summary>Multiple keys with multiple values</summary>

```swift
customTargetingValues: [
    "city": ["BANGALORE", "PUNE", "MUMBAI"],
    "country": ["INDIA", "BHUTAN"]
]
```

</details>
