recordActivity()

Overview

public void function recordActivity(
      required string  messageId
    , required string  activity 
    ,          struct  extraData
    ,          string  userIp   
    ,          string  userAgent
    ,          boolean first     = false
    ,          date    eventDate
)

Records an activity performed against an specific sent email. e.g. opened, clicked link, etc.

Arguments

NameTypeRequiredDescription
messageIdstringYesID of the message (send log) to record against
activitystringYesThe activity type performed (see system ENUM, `emailActivityType`)
extraDatastructNoStructure of additional data that may be useful in email send log viewer (e.g. URL of clicked link)
userIpstringNo
userAgentstringNo
firstbooleanNo (default=false)
eventDatedateNo