Getting Started

1. Get one or more Pyze App Keys

See instructions to get one or more Pyze App Keys depending on platforms (iOS and/or Android) you support for your OutSystems app.

2. Install the Pyze SDK

Install the Pyze OutSystems package

3. Setup & Initialize

Setup & Initialize Pyze in your OutSystems app

Build and Go!

You have enabled all screen flow funnels, loyalty, cohort and churn analysis, Intelligence data explorations, built-in events, auto segmentation, and much more. Use your app with the Pyze SDK and you should see data on growth.pyze.com.

In the following sections, you can add app-defined-, timed- and curated- events. To reach out to your users and create meaningful relationships, add push and in-app notifications.

4. Add events

Add Events to your OutSystems app.

A comprehensive overview of curated, app defined, timed and built-in events is available.

5. Build meaningful relationships with your users

Pyze delivers intelligence-driven marketing and growth automation, so you can build meaningful relationships with your users.

App SDK API, Samples, Resources for Apache Cordova developers

Setup & Initialize

Get Pyze App Keys

Get a Pyze App Key (PAK) for iOS and Android Apache Cordova apps from growth.pyze.com

1. Login to growth.pyze.com

Every app is uniquely assigned a Pyze App Key (PAK), a 22 character app specific key, which you obtain from growth.pyze.com after logging in with your email and password. If you have not signed up for Pyze, you can Get Pyze here first.

Login to growth.pyze.com

2. Add a new app

Click on the Add App button on top right corner and provide the details for your app, including name, platform and optional URL for the app store. Specify the timezone where you are located.

  1. Copy Pyze App Key from newly added app

Hover over the newly added app with rotating Pyze logo and copy the Pyze App Key (jUiix5alQ7KYSlG6ZQ_TXw in this example). Alternatively, you click on the “App Profile” icon and copy the PAK from the App profile page.

Alternatively, you click on the “App Profile” icon and copy the PAK from the App profile page.

Pyze OutSystems SDK

Installing Pyze OutSystems SDK

Run the following command inside your project directory.

cordova plugin add pyze-cordova --variable PYZE_APP_KEY="PYZE_APP_KEY_VALUE"

Run the following command inside your project directory.

cordova plugin add pyze-cordova --variable PYZE_APP_KEY="PYZE_APP_KEY_VALUE"

Now you are ready to Setup and Initialize for iOS and Android

Pyze OutSystems SDK: Setup & Initialize

The instructions on this page assume you have installed the Pyze SDK into your OutSystems project. If not, Install the SDK and come back to this page. See Getting Started OutSystems Guide.

Android

Running the install command will also initialize your application

Build and Go!

Events

Pyze OutSystems SDK - Events

  1. Open the module Extensibility Configurations
  2. Add the pyze plugin, json node to install and initialize
    {
     "plugin":{
         "identifier":"pyze-cordova",
         "variables":[{
             "name":"PYZE_APP_KEY",
             "value":"J8b4G2J2R8yTjh7If-FrBA"
         }]
     }
    }
    

Custom Event Handling

To enable event tracking, add javascript component to any action, and call appropriate pyze methods:

  1. Post custom events

     pyze.cordova.PyzeEvents.postCustomEvent("DELETED TODO");
    
  2. Post custom event with attributes

     var customAttribute = {};
     customAttribute.color = "Red";
     pyze.cordova.PyzeEvents.postCustomEventWithAttributes("Event Name",customAttribute);
    

Timed Events Tracking

  1. Timed Events

         pyze.cordova.PyzeEvents.postTimedEventWithName(eventName: String, timerReference: Number, timerReferece: any)
    
  2. Timed Events with Attribute Tracking

         pyze.cordova.PyzeEvents.postTimedEventWithNameAndAttributes(eventName: String, timerReference: Number, customAttributes: Object, timerReferece: any)
    

For more information on events tracking, please refer to our Cordova API Reference

Scene Activity Tracking

To track Scene details, use the SceneFlow events to track scene transitions

        pyze.cordova.PyzeSceneFlow.postSecondsOnScene("Login",durationOnTheScene);

Enable Mobile Marketing

Push Notifications with FCM

Google Notifications

Google provides the Firebase Cloud Messaging service (FCM) to allow app publishers to reach out to their users via push notifications.

App Publishers have the option of hosting and running servers “app servers” themselves to send notification content “payload” to FCM. Google then forwards the notification content to your app on user’s device.

Pyze customers do not have to maintain their own servers to communicate with Google’s Messaging service. Pyze can be used to send push notifications for an app in development, an app that is live in Google Play, and to a combination of apps in development and production.

Prerequisites

You must Create Firebase project in Firebase console. Click here after logging into the google account that owns your project for next steps.

Following sections

In the following sections, we will generate the google-services.json and enter the Server Key in growth.pyze.com. Then we will also enable push notifications in your Android project.

Configuring the Server API Key and Sender ID

In this section we will

  1. Get the Server Key and Sender ID for your app
  2. Enter the Server Key on growth.pyze.com
Generate the Server API Key and Sender ID
Login into the Google Account that owns your app
Go to Google Cloud Messaging and select Get a Configuration File
  • Obtain the Server API Key and Sender ID from the project settings for your
Enter the Server Key and Sender ID on growth.pyze.com
Login into your Firebase Console
  1. Select Your Project and Click on the Settings icon next to the Project name
  2. In the Cloud Messagin Tab, locate the Server Key and Sender ID
Login into your Pyze Account
  1. On the App Portfolio page, click on the App Profile icon for the app
  2. On the App Settings page, navigate to the Push Notifications settings for the app and enter the Server key and Sender ID and also quota limits for the maximum number of push messages your app can send in a day and a week
Integrate FCM Push Notifications in your App project
  1. Select “Data” tab of the module.
  2. Select resources and import the “google-services.json”
  3. Select the imported “google-services.json” file and update the “Deploy Action” to “Deploy to Target Directory”
  4. Enter “Target Directory” as “google-services”

In-App Notifications

Enable In-app Notifications in your App

In-app notifications allow app publishers to reach out to app users when they use your app. In-App Notifications are deeply integrated in Pyze Growth Intelligence and allow app publishers to reach out to users from manually from Dynamic Funnels and Intelligence Explorer, and automatically based on workflows and campaigns from Growth Automation.

Invoke in-app notification
pyze.cordova.Pyze.showInAppNotificatonWithCustomAttributes("PyzeInAppTypeAll", "#c9c9c9", function(messageDetails){
   pyze.cordova.PyzeEvents.postCustomEvent("OS CTA Clicked");
   pyze.cordova.Pyze.closeInAppMessage();
 });

Sending In-App notifications from growth.pyze.com

In-app notifications allow app publishers to reach out to app users when they use your app. In-App Notifications are deeply integrated in growth.pyze.com and allow app publishers to reach out to users from manually from Dynamic Funnels and Intelligence Explorer, and automatically based on workflows and campaigns from Growth Automation. For illustration purposes, we will send In-App Notifications from Dynamic Funnels.

  • Sending In-App notifications from Dynamic Funnels

    Create an event sequence, specify filters. You can reach out from either Dynamic Funnels or from Recent Sequences

    Create and send an In-app Notification. In this example, we will inform users of a tour we created for users

    View progress in Campaign History

Enable Personalization

Personalization Intelligence™

Enable Personalization in your App

To learn more about personalization see here.

In Intelligence explorer, for example, you may assign “High Value” tag to users who match the following criteria. This tag will be available in your app to personalize content feed, experience, user interface or messaging.

  • High Engagement and High Loyalty or
  • High Advocacy and Seasonal Ticket Holder or
  • High Revenue or
  • High Engagement, High Advocacy, and Low or Medium Attrition Risk or

The Personalization Intelligence™ tags assigned to a user are available in the agent and are accessible via class PyzePersonalizationIntelligence

The following methods are available in this class

getTags(callback)

Get all tags assigned to the user.
Note: Tags are case sensitive, High Value and high value are different tags.

Usage

pyze.cordova.PyzePersonalizationIntelligence.getTags(function(tags){
    console.log(tags);
});
isTagSet(tag, callback)

Returns true if requested tag is assigned to user.
Note: Tags are case sensitive, High Value and high value are different tags

Usage

pyze.cordova.PyzePersonalizationIntelligence.isTagSet("loyal", function(tagExists) {
    console.log(tagExists);
});
areAnyTagSet(listOfTags, callback)

Returns true if at least one tag is assigned.
Note: Tags are case sensitive, High Value and high value are different tags.

Usage

pyze.cordova.PyzePersonalizationIntelligence.areAnyTagSet(["loyal","High Value","Low value"], function(tagExists) {
    console.log(tagExists);
});
areAllTagSet(listOfTags)

Returns true if all tags requested are assigned to user.
Note: Tags are case sensitive, High Value and high value are different tags.

Usage

pyze.cordova.PyzePersonalizationIntelligence.areAllTagSet("loyal,High Value,Low value", function(tagExists) {
    console.log(tagExists);
});

Integration with iOS

Contact Pyze for integration with iOS