※この記事は英語版を翻訳しており、一部機械翻訳を含むため内容は後日更新される可能性があります。最新の内容は英語版を参照してください。表示言語は画面右下の言語名から切り替えられます。
Marketing Cloud(マーケティング・クラウド) で動的コンテンツを表示するステップと例注: この情報は、Content Builder(コンテンツ・ビルダー)によって生成されたコンテンツには適用されません。
1.テンプレートメールに次のコードを入れます (これにより、アカウントレベルのヘッダーとフッターを使用できるようになります)。
%%[ Var @Content_A,@Content_B,@Content_C Set @Content_A = Test_A Set @Content_B = Test_B Set @Content_C = Test_C ]%% %%[IF @Content_A == 'Yes' THEN]%% %%=ContentAreaByName("my contents\dynamic\Content_A")=%% %%[ELSEIF @Content_B == 'Yes' THEN]%% %%=ContentAreaByName("my contents\dynamic\Content_B")=%% %%[ELSEIF @Content_C == 'Yes' THEN]%% %%=ContentAreaByName("my contents\dynamic\Content_C")=%% %%[ELSE]%% No content to render.... this would be a subscriber who meets none of the previous criteria..this would be the default content if you wanted to have default content %%[ENDIF]%%
2.「My Contents」フォルダに 3 つの ContentAreas (Content_A、Content_B、および Content_C) を作成します。
注: ContentArea のフルパスは、ContentAreaByName() 関数で指定するため、「my contents\dynamic\Content_C」は、「My Contents」の下の「Dynamic」サブフォルダの下の Content_C です。HTML 内のコンテンツはシンプルにしてください (<H1>これはコンテンツ領域 A です</H1>)。これにより、基本的なコンテンツで関数をテストできます。
3.リストを作成し、上記のコードの各条件に対する値だけを持つ購読者を追加します。メール、ContentAreas、およびリストが用意できたら、テストリストでメールの送信プレビューを実行し、各購読者をプレビューしながら動的コンテンツの変更を確認できます。
%%[ Var @Content_A,@Content_B,@Content_C Set @Content_A = Test_A Set @Content_B = Test_B Set @Content_C = Test_C ]%%
%%[IF @Content_A == 'Yes' THEN]%% %%=ContentAreaByName("my contents\dynamic\Content_A")=%% %%[ELSEIF @Content_B == 'Yes' THEN]%% %%=ContentAreaByName("my contents\dynamic\Content_B")=%% %%[ELSEIF @Content_C == 'Yes' THEN]%% %%=ContentAreaByName("my contents\dynamic\Content_C")=%% %%[ELSE]%% No content to render.... this would be a subscriber who meets none of the previous criteria %%[ENDIF]%%000386274

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.