0

I created an email where we ask people to answer a question in the email with YES or NO. After clicking for instance on YES, a cloudpage will be loading ampscript and changes a field in Salesforce to YES. The cloudpage redirect directly to a thank you cloud page.

My question: Is it possible to disable or expire the link of the button after clicking on it?

2
  • Could you find a solution to it ?
    – Maneesh
    Jun 7 '18 at 14:03
  • No i didn't.... Jun 26 '18 at 6:26
0

One way could be creating a data extension that upserts clicks from a certain email send when running an SQL query within in an automation flow:

Select distinct
s.SubscriberKey,
e.JobID,
c.isunique as 'Clicks',
from [_sent] e
join [_click] c
on e.JobID = c.JobID and e.SubscriberID = c.SubscriberID 
where e.JobID like "JOBID HERE" 
and c.IsUnique = 1

Then within the top of the Cloud pages 'landing page', outside the HTML script, create a redirect that checks if the contact/subscriberkey is present in that data extension,

%%[
SET @TotalNumberOrders = 170
SET @UniqueIdentifier = QueryParameter('GUID')
SET @Email = QueryParameter('email')

set @exist = rowCount(LOOKUPROWS('DataExtensionOfClicks','GUID',@UniqueIdentifier))

IF @exist > 0 THEN 
  Redirect('https://AlreadyClicked.com')
ELSEIF @exist == 0 THEN
  Redirect('https://FreshNewClick.com')
ENDIF
]%%

This will check where the contact falls. Would need to be mindful or how frequent the data extension updates and when the next email is send.

2
  • 1
    I would encourage you to not use like with JobIDs when you already know them. Use '=' instead. Moreover " will most likely gonna crash you need to use ' in sql Apr 23 '19 at 12:40
  • Good point @JohannesSchapdick
    – Salvara
    May 3 '19 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.