# campaign-targeting

{% hint style="info" %}
📘 For more information about the campaign targeting JSON check this [page](/server-side/command-line-interface/ressource-schema.md)
{% endhint %}

## abtasty-cli web-experimentation campaign-targeting push

#### NAME

`abtasty-cli web-experimentation campaign-targeting push` - Push campaign targeting

#### SYNOPSIS

`abtasty-cli web-experimentation campaign-targeting push [-i CAMPAIGN_ID> | --id CAMPAIGN_ID] [-d DATA_RAW | --data-raw=DATA_RAW][--file FILE]`

#### DESCRIPTION

Push campaign targeting

#### EXAMPLES

```shell
abtasty-cli web-experimentation campaign-targeting push -i CAMPAIGN_ID --data-raw DATA_RAW
```

#### REQUIRED FLAGS

`--id = _CAMPAIGN_ID_`

The ID of the campaign

#### FLAGS

`--data-raw = _DATA_RAW_`

The new targeting JSON to push in the campaign

`--file = _FILE_`

File that contains new targeting json to push in the campaign

#### File Example

```json
{
    "segment_ids": [
        "segment_id"
    ],
    "url_scopes": [
        {
            "condition": "IS",
            "value": "URL example"
        }
    ],
    "favorite_url_scopes": [
        {
            "include": true,
            "favorite_url_id": "favorite_url_id"
        }
    ],
    "selector_scopes": [
        {
            "condition": "IS_SELECTOR_CLASS",
            "value": "Selector value"
        },
        {
            "condition": "IS_NOT_SELECTOR_ID",
            "value": "Selector value"
        }
    ],
    "code_scope": {
        "id": 12345,
        "value": "Code value"
    },
    "element_appears_after_page_load": false,
    "triggers_ids": [
        "trigger_id"
    ],
    "targeting_frequency": {
        "type": "regular",
        "unit": "day",
        "value": 20
    }
}
```

***

## abtasty-cli web-experimentation campaign-targeting get

#### NAME

`abtasty-cli web-experimentation campaign-targeing get` - Get campaign targeting

#### SYNOPSIS

`abtasty-cli web-experimentation campaign-targeting get [--output-format = OUTPUT_FORMAT [table|json|json-pretty]]`

#### DESCRIPTION

Get campaign targeting

#### EXAMPLES

```shell
abtasty-cli web-experimentation campaign-targeting get --id CAMPAIGN_ID
```

#### REQUIRED FLAGS

`--id = _CAMPAIGN_ID_`

The ID of the campaign you want to display

#### FLAGS

`--output-format = _OUTPUT_FORMAT_`

The output format for printing command output resources. The default format is `table`. The supported formats are `json-pretty`, `table`, `json`.

`--create-file = _CREATE_FILE_`

Create a file that contains campaign targeting details

`--override = _OVERRIDE_`

Override existing campaign targeting details file


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abtasty.com/server-side/command-line-interface/ab-tasty-cli-reference-v1xx/web-experimentation/web-experimentation-campaign-targeting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
