I've figured out how to put in dynamic utm parameters to append to all links in an email with the below ampscript.
%%[
Var @campaign, @pcode
Set @campaignID = "%%campaignid%%"
Set @pcode = "%%pcode%%"
]%%
My question is - is there a way to add to the ampscript what to fill in for those parameters if those fields don't exist in a customers Profile Attribute.
For example if a customer doesn't have a 'pcode
' can i set a default in the ampscript?
Set @campaignID = "%%campaignid%%"
. When these fields are inside a dataexentension you would do it like this:Set @campaignID = [campaignid]
if its a subscriber attribute you would use something likeSet @campaignID = AttributeValue(campaignid)
. But i guess it doesnt make any sense to store a campaignid in subscriber attributes :D