BeginImpressionRegion
Marks the start of an impression tracking region. Runtime-proven on a live Marketing Cloud Engagement CloudPage — the region name must be a literal, and a variable argument aborts the page.
Syntax
BeginImpressionRegion(regionName) → string
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
regionName |
string | Yes | Literal name of the impression region to open |
Example
%%[
BeginImpressionRegion("nav-region")
]%%
before-%%=BeginImpressionRegion("nav-region")=%%-after
Renders before--after — the call emits nothing into the page.
Paired with EndImpressionRegion around a block of content:
%%=BeginImpressionRegion("promo")=%%
Shop the sale
%%=EndImpressionRegion()=%%
Return value
string — an empty string. The call contributes nothing visible to the rendered output.
Behaviour
It emits nothing on a CloudPage. The call renders an empty string; wrapping it in marker text shows before--after, so nothing is passed through and no marker or comment is inserted.
The region name must be a literal. Passing a variable as the region name aborts the whole page (HTTP 422) at compile time. A literal string argument renders cleanly.
Show test script
%%[
VAR @b, @rn
SET @b = RequestParameter("b")
/* safe: a literal region name is accepted and emits nothing.
The before/after markers land adjacent, proving no output. */
IF @b == "safe" THEN
OutputLine(Concat("beforeBegin"))
BeginImpressionRegion("nav-region")
OutputLine(Concat("afterBegin"))
EndImpressionRegion(0)
OutputLine(Concat("afterEnd"))
ENDIF
/* risky: a variable region name aborts the page.
The start marker never renders; the fetch returns HTTP 422. */
IF @b == "begvar" THEN
OutputLine(Concat("begvar start"))
SET @rn = "dyn-region"
BeginImpressionRegion(@rn)
OutputLine(Concat("begvar done"))
ENDIF
]%%
Impression regions are an email-send feature: they name a region of a message so opens and clicks inside it can be tracked in aggregate. That tracking only exists in a sent email context and cannot be exercised from a CloudPage, where the call simply renders empty. This page proves only what a CloudPage can show — the call is accepted and emits nothing.
Availability
| Platform | Available |
|---|---|
| Marketing Cloud Engagement | Yes |
| Marketing Cloud Next | No |
See also
EndImpressionRegion— closes the region this opensTreatAsContentArea— takes an impression region name as its third argument- Official reference · ampscript.guide