I'm trying to find a solution for an HTTPGet problem. As I am using a Cloudpage as my email's content source, the following code works fine with the exception of the ability to track clicks. This code pulled from this article otherwise works well.

<script runat="server">

  var url = "https://pub.s6.exacttarget.com/34xemphnkok";
  var headerNames = ["Accept-Encoding"];
  var headerValues = ["gzip, deflate, sdch, br"];
  var response = HTTP.Get(url, headerNames, headerValues);


I've found others have used WRAP HTTPGET URLS via this:

    var @getStatus, @getURL, @content
    set @getURL = "http://www.example.com"
    set @content = HttpGET(@getURL, false, 2, @getStatus)
    set @content = Replace(@content,'href="http','href="httpgetwrap|http')


However, I am running into problems combining the two and was hoping someone out there has encountered this situation and has a solve.


  • 1
    Have you checked with support, that WRAP HTTPGET URLS in indeed enabled in your instance? This is a back-end setting, which you can't verify in SFMC UI. Feb 13 '20 at 21:22
  • 3
    Is there a reason you're scraping a landing page, rather than just executing your code in the email? Running API functions or something?
    – Macca
    Feb 14 '20 at 4:59
  • Macca, the answer is a bit convoluted, but in essence, multiple people work on the emails and others (over 500 people) need to view any changes live within the organization.
    – TZWyn
    Feb 18 '20 at 20:11
  • Lukas, I've been able to verify it is enabled with support. So that takes care of that hurdle. Combining the Wrap HTTPGet with the Cloudpage HTTPGet is now the issue I'm running into. Thanks!
    – TZWyn
    Feb 18 '20 at 20:13

Your Answer

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

Browse other questions tagged or ask your own question.