I am creating a cloudpage that will use AMPscript to update data of one data extension and insert in another. I was wondering how I could make sure that these functions would run.
So created the following block of code:
%%[
var @SubscriberKey, @InsertData, @UpdateData, @EmailAddress, @Language, @Country, @CouponCode
set @SubscriberKey = AttributeValue("SubscriberKey")
set @EmailAddress = AttributeValue("EmailAddress")
set @Language = AttributeValue("Language")
set @Country = AttributeValue("Country")
Set @CouponCode = AttributeValue("CouponCode")
set @InsertData = InsertData("Welcome_Email_TriggeredSendDE_Newsletter", "SubscriberKey", @SubscriberKey, ["EmailAddress", @EmailAddress], ["Language", @Language], ["Country", @Country], ["CouponCode", @CouponCode]
set @UpdateData = UpdateData("CommerceCloudSubscribers", 1, "SubscriberKey", @SubscriberKey, "DoubleOptin", "True")
]%%
How can I make sure that @InsertData and @UpdateDate will run when a subscriber will land on this page after clicking on a button from an email?
Thanks