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
    Commented Jun 7, 2018 at 14:03
  • No i didn't....
    – eazy4me
    Commented Jun 26, 2018 at 6:26

1 Answer 1

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 Commented Apr 23, 2019 at 12:40
  • Good point @JohannesSchapdick
    – Salvara
    Commented May 3, 2019 at 14:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .