Push.IO is a platform that supports segmentation of users into audiences and pushing notifications to those segments in a controlled manner. Combined with Gigya's user management tools, Push.IO becomes a very powerful tool for reaching predefined audiences with tailored notifications.
The Push.IO platform supports both Android and iOS integration.
Push.IO supports 'registering' users to categories on demand. When pushing a notification to a segment, every user who is registered to that segment will receive a notification. Notifications can be sent based on platform (e.g Android), segments (e.g Lakers fans), or directly to users.
Combining the Push.IO platform with Gigya's user management capabilities enables your app to reach custom audiences with precise messaging, and create a more personal connection between your app and its users.
This guide will take you through the basics of setting up Push.IO and integrating it with Gigya. Instruction and code examples are given for Android, but are available in the Push.IO documentation for iOS and Windows phone as well.
Assuming that Gigya's functionality is already integrated into your system, all you need in order to use Push.IO with Gigya is an active Push.IO account. To open a Push.IO account, sign up with Push.IO directly.
Follow the implementation instructions below in order to set up a basic integration.
Before we can start to code our custom push notifications mechanism, there are a few step required in order to configure Push.IO to comply with your app.
First, Push.IO provides you with a Web Dashboard to concentrate all of your push activity. The Web Dashboard allows you to perform actions such as sending easily without using API. The Dashboard is also a simple way to configure the integration between your app and push. Download the Dashboard from Push.IO once you have registered and opened an account.
Once your Dashboard is up and running, follow these basic steps to create a push platform for your application:
- Add an Android Platform to your Application
- Obtain Credentials for GCM (Google Cloud Messaging)
- Enter your GCM Credentials (Google Project Number and Google API Key) for your Android Platform on the Web Dashboard .
- Download the pushio_config.json file generated from your GCM Credentials and include it in your project's assets folder.
- Download the Android SDK (Push IO Manager) and include it in your project's lib folder.
- Add necessary code to instantiate the Push IO Manager in your application.
Detailed step-by-step instructions for Android that will take you through the configuration process can be found on the Push.IO website.
Once you have set up your platform and registered the Push IO Manager, you can start coding the logic behind your push server. The Push IO Manager handles user segmentation and pushes your notifications to the right audience. The following example illustrates a basic way of using Gigya's user info to segment a user, and then pushing a message to that segment using Push.IO's API.
Segmenting Users Using The User Object
The response of calling the getUserInfo method contains a user object, which can be used to gain insights on who your user is. In this simplified example, we take a look at the users age and gender to determine if the user is a young male. If so, we will register the user to the 'Young-Male' category, to be targeted with custom notifications later on.
Pushing To a Selected Group
Now that we have our users precisely segmented, we can target notifications to selected groups. The following example sends a push notification to all users registered to the 'Young Male' group, effectively reaching all male users under 40 using your app, alerting them that the new X-box is now available.
Pushing To Specific Users
Aside from segmenting, Push.IO also enables you to target specific users by registering their devices with the app. The following example illustrates how to register a user with Push.IO, an then how to use Gigya's user data to push a personalized notification to that user (or a list of users).
Registering a User
The following command registers the user's device with the username given as a parameter. After registering, the device can be targeted with push notifications using the username registered to it.Note that Push.IO does not save PII (Personally Identifiable Information), so if the username consist of such information (e.g Email address), a hashed version of the identifier should be stored.
Where 'aZbqNtbp' is a hashed version of the user's email or other PII identifier.
Pushing To a Specific User
Once the user is registered, you can send push directly to the device that was registered. The following code sends a push directly to a device:
Where and are your apps credentials taken from your Web Dashboard, 'api_key_1' is your apps API key and 'device_id1' is the registered ID of the user (in our case: 'aZbqNtbp').This format can be used to notify multiple recipients in a targeted manner. Read more on pushing to individual users.
Advanced Push Notification
This guide provides a very basic use of Push.IO's capabilities.The Push.IO platform enables much more complex operations, all detailed in Push.IO's documentation. For example, you can find some example cURL commands to send to Push.IO, some tools to create Advanced Segmentation, or a guide to setup scheduled push notifications, and much more.Combining Gigya's insights on users' data and Push.IO's on-demand reach creates a powerful and efficient marketing tool.