因此,一段时间后,我确实发现了发生了什么以及如何解决它。看来锚名称必须在 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,以便不会再次对其进行跟踪。该代码如下所示:
%%=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"> </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"> </td>
</tr>
</table>