3

I have an ExactTarget email in which part of the content is generated from XSL:

set @content = TransformXML(@markup, GetPortfolioItem("my xsl"))

The XSL creates links similar to this:

<a href='%%=RedirectTo(TreatAsContent("http://anywhere.com"))=%%'>anywhere</a>

I expected to get trackable links, instead I get this:

%%=RedirectTo(TreatAsContent("http://anywhere.com"))=%%

Has anyone in SO land tackled this problem before?

Thanks!

Update

I tried Kelly's suggestion, it didn't work:

%%[
  set @markup = MARKUP
  set @digestContent = TransformXML(@markup, GetPortfolioItem("trackable digest"))
 ]%%

%%=TreatAsContent(@digestContent)=%%

This is the output of the xsl transform:

%%[

  set @href1 = "https://investments.pimco.com/ShareholderCommunications/External%20Documents/All%20Asset%20Fund%20-%20736%20QIR.pdf"

  set @href2 = "https://rel-uat.investments.pimco.com/ShareholderCommunications/External Documents/pimco_all_asset_all_authority_PF4019I.pdf"

  set @href3 = "https://rel-uat.investments.pimco.com/ShareholderCommunications/External Documents/pimco_all_asset_all_authority_PF4019I.pdf"

  set @href4 = "http://managedaccounts.pimco.com/ManagedAccounts/External Documents/Total_Return_Managed_Account_Product_Profile_PMAPPTR.pdf"

  set @href5 = "http://managedaccounts.pimco.com/External Documents/Total_Return_Managed_Account_Product_Profile_PMAPPTR.pdf"

]%%
  <table
    width='100%' style='border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;'
    border='0' cellspacing='0' cellpadding='0'
  >



    <tr>
      <td valign='top'
          class='bodyContent'
          style='color: #707680; font-family: Verdana, Arial, Helvetica, sans-serif;
              font-size: 13px; font-weight: normal; line-height: 20px; text-align: left; 
              padding: 20px;
              background-color: #f1f3f4;'>
    <h3 style='font-size:14px; line-height:20px; font-weight:bold; color:#174A7C; margin:0; font-family:Verdana, Arial, Helvetica, sans-serif;'>
    Mutual Funds</h3>

      <h5 style='font-size:14px; margin:20px 0 5px; color:#0d0d0d;'>

      </h5>

        <p style='margin-top:20px;'>

<a style='color: #5C97CC; font-weight: bold; text-decoration: none;' href='%%=RedirectTo(@href1)=%%'>Fund Cards</a>
&emsp;<em style='font-size: 12px;'>
  updated 3/31/2014 1:21:50 PM
</em><br/>

        </p>

      <h5 style='font-size:14px; margin:20px 0 5px; color:#0d0d0d;'>
      PIMCO All Asset All Authority Institutional Share Fund Card
      </h5>

          &bull;&emsp;

<a style='color: #5C97CC; font-weight: bold; text-decoration: none;' href='%%=RedirectTo(@href2)=%%'>Fund Cards</a>
&emsp;<em style='font-size: 12px;'>
  updated 3/31/2014 1:21:50 PM
</em><br/>

          &bull;&emsp;

<a style='color: #5C97CC; font-weight: bold; text-decoration: none;' href='%%=RedirectTo(@href3)=%%'>Fund Cards</a>
&emsp;<em style='font-size: 12px;'>
  updated 3/31/2014 1:21:50 PM
</em><br/>


      </td>
    </tr>
    <tr>
      <td height='20'> </td>
    </tr>



    <tr>
      <td valign='top'
          class='bodyContent'
          style='color: #707680; font-family: Verdana, Arial, Helvetica, sans-serif;
              font-size: 13px; font-weight: normal; line-height: 20px; text-align: left; 
              padding: 20px;
              background-color: #f1f3f4;'>
    <h3 style='font-size:14px; line-height:20px; font-weight:bold; color:#174A7C; margin:0; font-family:Verdana, Arial, Helvetica, sans-serif;'>
    Managed Accounts</h3>

      <h5 style='font-size:14px; margin:20px 0 5px; color:#0d0d0d;'>
      Total Return Managed Account Product Profile
      </h5>

          &bull;&emsp;

<a style='color: #5C97CC; font-weight: bold; text-decoration: none;' href='%%=RedirectTo(@href4)=%%'>Product Profile</a>
&emsp;<em style='font-size: 12px;'>
  updated 3/31/2014 1:21:50 PM
</em><br/>

          &bull;&emsp;

<a style='color: #5C97CC; font-weight: bold; text-decoration: none;' href='%%=RedirectTo(@href5)=%%'>Product Profile</a>
&emsp;<em style='font-size: 12px;'>
  updated 3/31/2014 1:21:50 PM
</em><br/>


      </td>
    </tr>
    <tr>
      <td height='20'> </td>
    </tr>


</table>
  • Can you update your question with the code below as well - same result I take it? – Kelly J Andrews Apr 9 '14 at 18:47
  • We might also need to look at the XSL/XML a bit as well, as the issue could be stemming from that location too. The method below I know works, so there must be something getting in the way. – Kelly J Andrews Apr 9 '14 at 18:48
  • @KellyJAndrews, the links in the email all work, they just don't get tracked. – bojackey Apr 9 '14 at 18:58
  • I'm looking into this, but maybe someone else who has this working will chime in as well. – Kelly J Andrews Apr 10 '14 at 12:33
2

WRAP_HTTPGET_URLS does raise a few concerns:

  1. There is a limit to the number of unique links which can be wrapped via this process for any given "send". Sends are identified by JobId. A link sharing an identical, character for character, URL with another link will not be considered unique (and thus not count against the total).

  2. Due to performance concerns, the functional maximum number of unique links which can be wrapped in any send is 100.

  3. Triggered Sends do not create new JobIDs for each send, thus it is practically impossible to utilize this methodology with Triggered Sends.

More to the point, if the URL is static (contains no substitution strings and/or is not built via scripting), then HTTPGetWrap() is a viable option. For "dynamic" links, it is likely that other strategies should be pursued.

Wrapping links for tracking is a resource intensive process. To ensure maximum functionality and performance, the best route is always to stage the link data in ExactTarget in advance of the send occurring. This can be accomplished through static content inside email creative or via Data Extensions and pulled into the email via scripting. If the link is available in advance, nearly all barriers to wrapping are removed.

| improve this answer | |
  • This. This is a filthy little SFMC secret that really sucks if you're doing highly dynamic content -- and you want to track the clicks. – Adam Spriggs Mar 10 '17 at 12:56
0

What's most likely causing this issue, is that once the TransformXML() function runs, the content is never passed through OMM to run the AMPscript. When you output your @content, you want to treat that as content. Code below:

In Email

%%[
    set @content = TransformXML(@markup, GetPortfolioItem("my xsl"))
]%%

%%=TreatAsContent(@content)=%%

In XSL:

<a href='%%=RedirectTo("http://anywhere.com")=%%'>anywhere</a>

Give that a shot, and let me know if it works.

| improve this answer | |
  • Hi Kelly, thanks for answering. I tried that technique after i posted my question (it didn't work): %%[ set @@markup = MARKUP set @@digestContent = TransformXML(@markup, GetPortfolioItem("trackable digest")) ]%% %%=TreatAsContent(@@digestContent)=%% (the double @@'s aren't in my code, they're there beacause SO made me put them there ) – bojackey Apr 9 '14 at 18:27
0

Try this. I had an issue with tracking while only pulling in a portion of the URL. Our base URL was universal, i.e. example.com. But once it was all done it pulled the rest of the URL from a Non-Sendable data extension. So the final URL that rendered was something like this:

example.com/about_us

%%[ var @Product1, @Name1, @URL1, @website, @Link1

/* Calls the Actual Row named Product1 */
set @Product1 = "Product1"

/* Renders the value in at the intersection of Category and Product Name for Product1 */
set @Name1 = Lookup("Product_DX","Product_Name","Category", @Product1)

/* Renders the value in at the intersection of Category and URL_String for Product1 */
set @URL1 = Lookup("Products","URL_String","Category", @Product1)

/* Variable Website Renders the value example.com */
set @website =  "http://www.example.com/"

/* Compiles the website base url with the rest of the URL string */
set @Link1 = Concat(@website, @URL1)

]%%

<a href="%%=RedirectTo(TreatAsContent(@Link1))=%%">%%=v(@Name1)=%%</a>
| improve this answer | |
  • This doesn't really address the links not getting wrapped properly. – Adam Spriggs Mar 10 '17 at 13:01
0

There is one trick to get the links wrapped correctly for the tracking purposes after you transform the XML into HTML.

If you have simple links in the XSL then you can do following:

In XSL:

<a href="httpgetwrap|http://link.to.the.site">Target link</a>

And then in Email:

%%=TreatAsContent(TransformXML(@markup, GetPortfolioItem("my xsl")))=%%

Alternatively if you are building links on-the-fly, it might be cleaner to use following approach:

Build your link in XSL so it ends up as normal link, e.g.:

<a href="http://link.to.the.site?param=a&param2=b">Target link</a>

Then in Email:

%%=TreatAsContent(Replace(TransformXML(@markup, GetPortfolioItem("my xsl")),'href="','href="httpgetwrap|'))=%%

There are some considerations to using this technique as that approach might slow down the send speed due to the additional processing required.

Also, as a reference point have a look at the following help page walking through the Content Syndication.

Vlad

| improve this answer | |
  • Thanks for the suggestion @Vlad. I tried it the 'simple links' scenario, the links still do not get tracked. – bojackey Apr 29 '14 at 19:41
  • 1
    You might need to contact support or your account rep and ask to enable the WRAP_HTTPGET_URLS business rule. It will enable this functionality as it might be disabled by default on your account. – Vlad May 1 '14 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.