Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Hooking onto successful messages

@adamt19

Participant

messages_message_sent seems to work. So I guess the follow up question is how to check:

is the message updating an existing thread *where other members have also submitted messages*, OR
is the message a new-message (or is the person simply sending a second message after not receiving a reply?)

I’m hoping to use that information to send additional data about the message sent event (new vs reply..)

As always, will post my steps if I figure it out on my own 😉

add_action( 'messages_message_sent', 'mm_mp_message_sent', 10 );

function mm_mp_message_sent() {	 
	$mp = Mixpanel::getInstance("xxxxxxxxxxxxxxxxx");
	global $bp;
	$mp->identify($bp->loggedin_user->id);
	$mp->track("Sent message");
}
Skip to toolbar