この記事では、プリヘッダー内のAMPScript変数が欠落または空白で表示される理由を説明します。
プリヘッダー内のAMPScript変数を<body>タグ内に配置すると、メールの受信トレイで表示されません。プレビューやテストの段階では変数が表示されます。しかし、メールを送信すると変数は表示されません。
例 :
プリヘッダー : Welcome %%=v(@firstname)=%%
<html>
<body>
%%[
SET @firstname='Alex'
]%%
</body>
</html>
このメールを送信すると、メールの受信トレイでプリヘッダーの値が表示されません。
プリヘッダーは、HTML コードの <body> タグより前の <head> タグと同じタイミングで評価されるためです。
実際の送信でプリヘッダーの変数を表示させるには、AMPScriptブロックを開始<body>タグの前に配置する必要があります。
例 :
プリヘッダー : Welcome %%=v(@firstname)=%%
<html>
%%[
SET @firstname='Alex'
]%%
<body>
Insert some email content here
</body>
</html>
これで、メールの受信トレイでプリヘッダーの値が表示されます。
000384371

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.