I have a use case as below,
I'm sending an email from the email studio when the audience clicks on the email CTA button, it takes them to a cloud landing page then I want to send a user's value to data extension when the users click the CTA button on the landing page.
I have the below code in the email and passing URL parameters values when email CTA button clicked:
and I have placed the below code in the LP in order to work when the audience clicks the CTA button:
<div class="cta-wrapper"> %%[ var @Subkey, @source, @medium, @campaignname SET @Subkey = RequestParameter('sfmc_id') SET @source = RequestParameter('utm_source') SET @medium = RequestParameter('utm_medium') SET @campaignname = RequestParameter('utm_campaign') SET @value = upsertData("Test_LP1",1,"sfmc_id",@Subkey,"utm_source",@source,"utm_medium",@medium,"utm_campaign",@campaignname,"Date",NOW()) ]%% <'button class="cta-button cta-button_primary" onclick="window.open('https://abc','_blank')">Click here!</button> <a href="#loyalty-programs">Want to know more?</a> </div'>
the above ampscript works as it updates the data extension with value when the audience opens the LP but instead when the audience clicks the CTA button in the LP.
Does anyone have an idea how this can be fixed? I want to send value to data extension when the audience clicks the CTA button on the LP instead when they open it.
Thanks and Best regards, Vinoth