---
schema_version: "1"
id: e6fb2ba1ee84e9aa2983ee0dc6f2ab1c0aec60ec352465e245014902f6260d41
title: EndImpressionRegion
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/references/content/mc-ampscript-reference-content-end-impression-region.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-content/mc-ampscript-reference-content-end-impression-region.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: bd7d1e1b861c6871d11c4a20bf0ef2061cb197214d0d227dbb78ec9f05215e76
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# EndImpressionRegion

Denotes the end of a region to track using impression tracking.

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>✅ Yes</td>
  </tr>
</table>

## Syntax

```
EndImpressionRegion(boolEndAllRegions)
```

The `EndImpressionRegion()` function has one parameter:

- `boolEndAllRegions` (boolean): If `true` or `1`, the function ends all previous impression regions. If `false`, the function only closes the preceding impression region. The default value is `false`.

## Usage

To call the function, determine whether you want to end all impression regions, or only the impression region that preceded it.

This example ends the preceding impression region only.

```
%%=EndImpressionRegion(false)=%%
```

This example ends all of the impression regions in the message.

```
%%=EndImpressionRegion(true)=%%
```

The system automatically ends all impression regions that aren’t explicitly closed by the end of the email.

## See Also

- [BeginImpressionRegion()](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-content/mc-ampscript-reference-content-begin-impression-region.md)
- _Salesforce Help_: [Track Content Performance with Impression Regions](https://help.salesforce.com/s/articleView?id=mktg.mktg_content_impression_regions.htm)
