I have one email which has link to cloud page/ landing page. the URL is passing email address in url parameter and then ampscript is fetching all values from DE to the LP. But I am stuck with fetching content blocks in landing page.
her is what i have tried.
EMAIL:
%%[
Var @landingPage, @key
set @key = Base64Encode(emailaddr)
set @landingPage = concat("https://pub.s7.exacttarget.com/n21?key=%%=v(@key)=%%")
]%%
Landing Page:
%%[
var @key, @decode, @lastprod, @spend, @target
set @key = QueryParameter('key')
set @decode = Base64Decode(@key)
set @lastprod = FIELD(ROW(LookupRows("LoyaltyProgram", "EmailAddress", @decode),1),"AbandonedCartItem1")
set @spend = FIELD(ROW(LookupRows("LoyaltyProgram", "EmailAddress", @decode),1), "TotalTransactionAmount")
IF @spend >= 200 THEN
set @target = %%=ContentAreaByName('FY20\Jan20\content Blocks\test')=%%
Else
set @target = %%=ContentAreaByName('FY20\Jan20\content Blocks\loyal')=%%
ENDIF
]%%
The page is erroring out as I am doing something wrong with if else condition or parameters fetching the content.