Mixpanel tutorial (2)

Source: Internet
Author: User

6. Send emails and push notifications

Select the user's checkbox, click send a notification, and select email message/push notifiaction from the drop-down list to send emails or push notifications to the user.

In the mail body, you can use some special labels, such:


{$ {Name }}} indicates the name attribute in the user profile.

Click "continue" to allow you to choose the sending time, or specify the sending time immediately:


Note that there is no Beijing time in the time zone. You can select Shanghai time.

Select now and send this message. The email will be sent immediately.

In addition, there is also a way to send notifications, which can be scheduled for the time period of sending notifications.

To send a push notification to a user, you need to collect the device tokens of the User device in the application delegate and send them to the mixpanel using addpushdevicetoken:

-(Void) Application :( uiapplication *) applicationdidregisterforremotenotificationswithdevicetoken :( nsdata *) devicetoken {

Mixpanel * mixpanel = [mixpanel sharedinstance];

[Mixpanelidentify: @ "kmyhy"];

[Mixpanel. People addpushdevicetoken: devicetoken];

}

If you do this, you will see the device token (the iOS devices attribute) of the user in the user's profile ):


Then you can send a push notification to the user.

The message writing interface of mixpanel is quite interesting. It displays an image of push notification received when the iPhone lockscreen is locked. to edit the message content, edit the message content on the screen, as shown in:


It is worth noting that the prompt sound cannot be directly added to the Message editing interface. You must provide the prompt sound through payload in custom data. mixpanel will merge custom data into the editing result:


For example, write the following payload to play the default prompt sound and display the logo with a number 1 while the user receives the message:

{"APs": {"sound": "default", "badge": 1 }}


Mixpanel tutorial (2)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.