0

したがって、ルックアップ データ エクステンション (データ テーブル) から動的に取得される URL があります。次のような構造になっています: https://www.clientsite.com/on-boarding/#anchorlocation . ただし、メールをテスト送信してリンクをクリックすると、ページに移動しますが、アンカーはリンクされたアンカーの場所に移動しません。調査の結果、URL の末尾からトラッキング パラメータを削除すると、元の URL であったため、意図したとおりに機能したことがわかりました。ただし、追跡が必要なため、追跡を削除することはできません。それで、問題は何ですか?コードの例を次に示します。

<table width="100%" cellspacing="0" cellpadding="0" border="0">
   <tr>
      <td valign="middle" align="center">
        <a alias="%%=v(@Alias)=%%" href="%%=RedirectTo(@URL)=%%" target="_blank"><img alt="" border="0" src="%%=v(@VideoImage)=%%" style="display:block;" title="" width="100%" /></a></td> 
   </tr>
</table>

メールが送信された後の URL の例を次に示します。このリンクはページに移動しますが、ページのアンカー セクションには移動しません。

https://www.clientsite.com/on-boarding/#anchorlocation?utm_source=Onboarding&utm_medium=email&utm_term=Card%20Ship&utm_content=AliasName&utm_campaign=Onboarding_Card_Ship

4

1 に答える 1

0

それで、しばらくして、何が起こっているのか、それを修正する方法を見つけました。アンカー名は URL の最後にある必要があるようです。したがって、次のようになります。

https://www.clientsite.com/on-boarding/?utm_source=Onboarding&utm_medium=email&utm_term=Card%20Ship&utm_content=AliasName&utm_campaign=Onboarding_Card_Ship#anchorlocation

動的コンテンツでそれをどのように達成したかを次に示します。追跡パラメーターが何であるか、データを入力するためのデータがどこから来るかを知っています。そのため、Ampscript Concat 関数を使用して URL を再配置するだけで済みました。そのコードの例を次に示します。

%%[
/* This is pulled from the DE or Data Table */
Set @URL = '#anchorlocation' 

/* This resets the variable to the rearranged url */
Set @URL = Concat('https://www.clientsite.com/on-boarding/?utm_source=',__AdditionalEmailAttribute1,'&utm_medium=email&utm_term=',__AdditionalEmailAttribute2,'&utm_content=Alias&utm_campaign=',emailname_,@URL) ]%%

次に、コードで変数を呼び出すときに、アンカー タグとイメージ タグの html を連結して、トラッキングが 2 回目に配置されないようにする必要があります。そのコードは次のようになります。

%%=concat('<a alias="',@Alias,'" href="',@URL,'" target="_blank"><img alt="" border="0" src="',@Image,'" style="display:block;" title="" width="100%" /></a>')=%%

まとめると、コード全体は次のようになります。

%%[ Set @URL = Concat('https://www.clientsite.com/on-boarding/?utm_source=',__AdditionalEmailAttribute1,'&utm_medium=email&utm_term=',__AdditionalEmailAttribute2,'&utm_content=Video_Alias&utm_campaign=',emailname_,@URL) ]%%<table width="100%" cellspacing="0" cellpadding="0" border="0" bgcolor="#E8E8E8">
   <tr>
      <td style="line-height:1px; font-size:1px;" height="1" bgcolor="#DEDEDE">&nbsp;</td>
   </tr>
   <tr>
      <td valign="top" bgcolor="#E8E8E8" align="left">
         <table width="100%" cellspacing="0" cellpadding="0" border="0">
            <tr>
               <td valign="middle" align="center">%%=concat('<a alias="',@Alias,'" href="',@URL,'" target="_blank"><img alt="" border="0" src="',@Image,'" style="display:block;" title="" width="100%" /></a>')=%%</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr>
      <td style="line-height:1px; font-size:1px;" height="1" bgcolor="#DEDEDE">&nbsp;</td>
   </tr>
</table>
于 2021-04-22T18:56:50.863 に答える