Runtime verified Test scripts included

Syntax

EndImpressionRegion([endAllRegions])  →  string
0–1 arguments

Parameters

Name Type Required Description
endAllRegions string | boolean | number No A truthy value ends every open region; the default ends only the most recent

Example

%%[
  BeginImpressionRegion("promo")
  EndImpressionRegion()
]%%
before-%%=EndImpressionRegion()=%%-after

Renders before--after — the call emits nothing into the page.

Close all open regions at once with a truthy argument:

%%=EndImpressionRegion(true)=%%

Return value

string — an empty string. The call contributes nothing visible to the rendered output.

Behaviour

It emits nothing on a CloudPage. With zero or one argument the call renders an empty string; wrapped in marker text it shows before--after.

Zero and one argument both render cleanly. The no-argument form closes the most recent open region; a truthy argument closes every open region.

The argument is truthy-typed, not strictly boolean. Boolean true, string "true", and number 1 are all accepted and render without error — the parameter is widened accordingly.

Show test script
%%[
  VAR @b
  SET @b = RequestParameter("b")

  /* safe sweep: every accepted flag form emits nothing.
     Each call sits between adjacent markers to prove no output. */
  IF @b == "safe" THEN
    OutputLine(Concat("beforeZero"))
    EndImpressionRegion()
    OutputLine(Concat("afterZero"))
    EndImpressionRegion(true)
    OutputLine(Concat("afterTrue"))
    EndImpressionRegion("true")
    OutputLine(Concat("afterStr"))
    EndImpressionRegion(1)
    OutputLine(Concat("afterNum"))
  ENDIF
]%%

Impression regions are an email-send feature. The distinction between ending one region and ending all of them affects impression tracking in a sent message, which cannot be observed from a CloudPage — there the call simply renders empty regardless of argument. This page proves only what a CloudPage can show.

Availability

Platform Available
Marketing Cloud Engagement Yes
Marketing Cloud Next No

See also