1

I want to implement a Customer Satisfaction section at the end of my emails.

It will be a few pictures with emoji faces that when pressed I want them to store the value straight into a Data Extension linked with the CustomerID so I can later target them.

Is this achievable with AMPScript? If so, what functions do I have to use? Thanks!

4

What you would do is have each of these link to the same cloud page via CloudPagesURL() function. You then append an added parameter (inside the function) to share which image they clicked. E.g. %%=CloudPagesURL(ID, 'Satisfaction', 'FrownyFace')=%% which could be utilized as the href for the Frowny face emoji to show dissatisfaction.

For example:

<a href="%%=RedirectTo(CloudPagesURL(123456, 'Satisfaction', 'FrownyFace'))=%%"><img src="https://www.imageserver.com/frownyface"></a>

You then repeat that for each emoji you want.

You then would need to have processing on the cloud page to grab the passed parameters and then upsert this into a Data Extension.

Something like:

%%[
    set @SubscriberKey = AttributeValue("SubscriberKey")
    set @Satisfaction = RequestParameter("Satisfaction")

    upsertData('myStatisfactionSurveyDE',1,'SubscriberKey',@SubscriberKey,'Satisfaction',@Satisfaction)

]%%

This will then collect the SubscriberKey (or whatever unique identifier you want to use from your sendable data and the Satisfaction value passed from the CloudPagesURL() function to a data extension you will use to store the results.

Just remember that on click they will be hitting a landing page, so you should probably display some content on it as well. I would also take into consideration that each person that lands on this page will cost you a super message as this is a live cloud page.

  • Thanks for sharing not only technical details but also the COST implications!! this would help all the new Marketing Cloud Consultants. – Vishal Kumar C V Jan 10 at 19:23
3

the processing is done on a cloudpage handler. Set up a Cloudpage as target for the link and write AMPScript there.

Each Emoji can point to the same Cloudpage, and the different emojis can deliver different parameter values.

Use CloudPagesURL() function to point to the cloudpage, adding additional parameters so that the link the cloudpage is appended with e.g. ?f=good, assuming you just call the type of feedback "good".

Also add the jobid, you always want to know which email the feedback was given for:

You links behind 3 emojis could basically be:

%%=CloudPagesURL(123,'f',good,'jid',jobid)=%%

%%=CloudPagesURL(123,'f',medium,'jid',jobid)=%%

%%=CloudPagesURL(123,'f',bad,'jid',jobid)=%%

The link is automatically encrypted. 123 is the id of the cloudpage.

Assuming that you just want ONE feedback per jobid, make the subscriberkey AND the jobId field primary keys in your tracking DE and use upsertData.

On the Cloudpage you then need the functions requestparameter, upsertData and redirect:

%%[
SET @feedback = RequestParameter('f')
SET @jobid = RequestParameter('jid')
SET @subscriberkey = _subscriberkey /* automatically delivered with cloudpagesURL() links */


UpsertData('trackingDE',1,'subscriberKey',@subscriberkey,'timestamp_servertime',NOW(),source,@jobid,'feedback',@feedback)
/* it is recommended to always timestamp your entries and add a source. just helps when processing data further. */

Redirect('https://www.somethankyoupage.com')
]%%

Code is from memory, but should be correct. Hope this helps!

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.