0

I'm working on a customer satisfaction system and I would like to record the time when the user has clicked one of the emojis.

Is there a way to do this?

This is what I have so far

Cloud page code

%%[

    SET @CustomerID = RequestParameter('CustomerID')
    SET @EmailAddress = RequestParameter('EmailAddress')
    SET @emoji_selected = RequestParameter('emoji_selected')

    UpsertDE('emoji',1,'CustomerID',@CustomerID,'EmailAddress',@EmailAddress,'emoji_selected',@emoji_selected)

    ]%%

HTML code

%%[

    SET @CustomerID = AttributeValue('CustomerID')
    SET @EmailAddress = AttributeValue('EmailAddress')

    ]%%

    <table align="center" style="text-align: center;font-family:arial;font-size:9px;">
    <tr>

    followed by the html/css...

1 Answer 1

2

You can use the now() function to get the current timestamp, resulting in following code:

%%[

SET @CustomerID = RequestParameter('CustomerID')
SET @EmailAddress = RequestParameter('EmailAddress')
SET @emoji_selected = RequestParameter('emoji_selected')
SET @clickTime = Now()   
UpsertDE('emoji',1,'CustomerID',@CustomerID,'EmailAddress',@EmailAddress,'emoji_selected',@emoji_selected,'clickTime',@clickTime)

]%%

Please observe, this timestamp will be stored in UTC-6. If needed, you will have to adjust it to the relevant local time zone using SystemDateToLocalDate():

set @clickTimeLocal =  SystemDateToLocalDate(@clickTime)
1
  • Thanks @Lukas..
    – Duicug
    Commented Jan 22, 2020 at 13:53

You must log in to answer this question.

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