What I have is an app that pulls in social media and displays that content in ExactTarget. I want to set text and links in the email based upon the content in the social post... in this case WordPress.
So basically I'm pulling in the dynamic content using an HTTPget. Within that content I am setting AMPscript variables. The issue is I need to output the variable in code before it gets set (using the HTTPget).
In the below example @meta_title
and @meta_url
is being set in the HTTPget. Here is my example:
<!-- A CTA to appear before the other content being displayed. --->
New Blog Post:%%=v(@meta_title)=%%. Click To <a href="%%=RedirectTo(@meta_url)=%%">Read Now</a>
<!-- Get The Content Containing The Variable --->
%%[
Set @taca = TreatAsContentArea("73", HTTPGet("http://websiteurl.com/feed", false, 0, @CallStatus))
]%%
<!-- Display The Social Content --->
%%=v(@taca)=%%
The problem I am having is since %%=v(@meta_title)=%%
is declared before the HTTPget
the variable is empty. Oddly %%=RedirectTo(@meta_url)=%%
works because I guess the RedirectTo()
function evaluates after the email is rendered. To the the @meta_title
to work I was trying to maybe queue the HTTPGet
somehow to get the variables but not output or somehow retroactively replacing text in the href
.
Any ideas?