Getting Started

1. Get one or more Pyze App Keys

See instructions to get one or more Pyze App Keys.

2. Setup & Initialize

Setup & Initialize Pyze in your Neptune 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.

3. Add events

Add Events to your Neptune app.

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

Get Pyze App Keys

Get a Pyze App Key (PAK) for each Neptune app created.

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

  • To add an application to the Pyze platform, begin by selecting Settings from the Navigation Pane.
  • Under the Apps Tab, click the Add App+ button at the top right of the window.
  • Enter the App Name and Appstore URL (if available), Platform (iOS, Android, Web/SaaS, tvOS, watchOS) and select your Timezone.

4. Copy Your Pyze App Key

Once you add your new app, refresh the page. Navigate to your newly added app’s settings by selecting the app from the drop-down list. The Pyze App Key will be displayed below to the right (DmPTFdslRjObk1-ZlXQDVQ in this example). Copy Pyze App Key.

Setup & Initialize

The instructions on this page assume you have obtained the Pyze App Key for your project. If not, visit Getting Started Neptune Guide.

a. Open the Neptune App Designer, Open the Neptune App and then select the header file of the app.

b. Paste the below JavaScript code inside header file as shown above.

c. Replace “YOUR_PYZE_APP_KEY” with the Pyze App Key obtained from your growth.pyze.com account.

d. The JavaScript library provides two global variables: Pyze and PyzeEvents to send data to Pyze Servers.

<!-- Start Pyze Growth Intelligence -->
<script type="text/javascript">
    var pyzeAppKey="YOUR_PYZE_APP_KEY";
    !function(e,t){var n=e.Pyze||{_q:[]},s=e.PyzeEvents||{_q:[]},i=e.PyzeCuratedEvents||{_q:[]},p=e.PyzeIdentity||{_q:[]};function r(t,e){function n(e){t[e]=function(){t._q.push([e].concat(Array.prototype.slice.call(arguments,0)))}}for(var s=0;s<e.length;s++)n(e[s])}r(n,["initialize","getTimerReference","getAppInstanceId","postWebAppVersion","postPageView","setUserOptOut","deleteUser"]),r(s,["postCustomEvent","postCustomEventWithAttributes","postTimedEvent","postExplicitActivation"]),r(i,["post"]),r(p,["setUserIdentifier","resetUserIdentifier","postTraits"]);var o=t.createElement("script"),a=t.getElementsByTagName("script")[0];o.type="text/javascript",o.async=!0,o.src="https://cdn.pyze.com/pyze.js",a.parentNode.insertBefore(o,a),e.Pyze=n,e.PyzeEvents=s,e.PyzeCuratedEvents=i,e.PyzeIdentity=p}(window,document),Pyze.initialize(pyzeAppKey);    
</script>
<!-- End Script Pyze Growth Intelligence -->

Remember to replace “YOUR_PYZE_APP_KEY” with the Pyze App key you got from growth.pyze.com

Build and Go!

Add Events

See a detailed Events Overview here.

Pyze has made it easy for you to capture events. We support custom and timed events.

Custom Event Handling

We support custom events that can be used to track any event within the web app and can be called with or without attributes. See postCustomEvent and postCustomEventWithAttributes method in the Pyze class (See here).

// Custom Event without Attributes
PyzeEvents.postCustomEvent("Blog Read");

// Custom Event with Attributes
// Create an object with key value pairs of custom attributes and post with postCustomEventWithAttributes

var attributes = {};
attributes["screen"] = "Home";
attributes["seconds spent"] = "50";

PyzeEvents.postCustomEventWithAttributes("Blog Read", attributes);

//Events with Attributes as Object
var attributes = {};
var address = {"city":"Redwood city","state":"CA","phone":{"home":{"area":"408", "prefix":"434", "linenumber":"5234"}}};
attributes["address"] = address;
PyzeEvents.postCustomEventWithAttributes('Blog Read', attributes)

Timed Events

Use the timed events API for timing events. See getTimerReference in the Pyze class and postTimedEvent method in the PyzeEvents class (See here). The method accepts two parameters: Event Name and Custom Attributes

// Start timing the event with getTimerReference method with a callback
var time;
Pyze.getTimerReference(function callback(result){
  time = result;
});

// Post timed event with event start time and attributes
// Create an object with key value pairs of custom attributes and post with postTimedEvent
var attributes = {};
attributes["screen"] = "Home";
attributes["seconds spent"] = "50";

PyzeEvents.postTimedEvent ("Blog Read", time, attributes);

//Post Timed Events with Attributes as Object
var attributes = {};
var address = {"city":"Redwood city","state":"CA","phone":{"home":{"area":"408", "prefix":"434", "linenumber":"5234"}}};
attributes["address"] = address;
attributes["seconds spent"] = "50";
PyzeEvents.postTimedEvent('Blog Read', time, attributes)

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

Page Tracking

To track application pages, use the postPageView events.

Pyze.postPageView("PageTitle", "Page URL");

User Privacy

Pyze provides APIs to allow end-users to Opt out of Data Collection and also instruct the Pyze system to forget a user’s data.

setUserOptOut

Allows end-users to opt out from data collection. Opt-out can be toggled true or false.

Pyze.setUserOptOut(true) 

To resume user data collection set value to false

Pyze.setUserOptOut(false) 

deleteUser

Allows end-users to opt out from data collection and delete the user in the Pyze system. We recommend you confirm this action as once a user is deleted, this cannot be undone.

Pyze.deleteUser(true)