Pega Systems

Integrate Pyze analytics with Pega applications

Overview

Pyze for Pega enables analytics tracking in both Traditional and Constellation Pega applications. Once installed, Pyze automatically captures user interactions and allows you to track custom events and user profiles.

Prerequisites: Create a Pyze app and obtain your App Key before proceeding.


Getting Started

Step 1: Download the Package

Download the latest Pyze component from the GitHub releases page.

Step 2: Import into Pega

  1. Open Dev Studio
  2. Navigate to Configure β†’ Application β†’ Distribution β†’ Import
  3. Select the downloaded zip file and click Next
  4. Continue through the wizard until import completes
Import Pyze component
× Import Pyze component

Step 3: Enable the Component

  1. Open Application Definition in Dev Studio
  2. Click Manage Components under Enabled Components
  3. Select Pega Pyze Component and click OK
Enable Pyze component
× Enable Pyze component

Step 4: Configure Your App Key

  1. Open Data types from the left menu
  2. Click the dropdown arrow and select Add data type
Add data type
× Add data type
  1. Choose Existing Data Type and search for “Pyze”
  2. Select AppKeysForPyze and click Submit
Select AppKeysForPyze
× Select AppKeysForPyze
  1. Open the data type and go to the Records tab
  2. Add a record with your Application Name and Pyze App Key
Configure App Key
× Configure App Key

For Constellation applications: Continue to the next section to deploy the Pyze widget.


Constellation UI: Widget Deployment

Constellation applications require the Pyze widget to be manually added to pages where you want tracking enabled.

Add Widget to Home Page

  1. Open App Studio
  2. Go to Channels and interfaces β†’ Landing Page β†’ Portal
  3. Click pyHome
  4. Click +Add and select the Pyze widget
  5. Save changes
Add Pyze widget to home page
× Add Pyze widget to home page

Add Widget to Case Types

Repeat for each case type you want to track:

  1. Open Dev Studio
  2. Go to Case Designer and select your case type
  3. Open the UX tab
  4. Click +Add and select the Pyze widget
  5. Save changes
Add Pyze widget to case type
× Add Pyze widget to case type

Verify Installation

Confirm the following:

  • Pyze widget appears on the pyHome landing page
  • Pyze widget appears on your case type screens
  • App Key is correctly configured
  • Data appears in your Pyze dashboard

User Profiles

Link events to specific users by setting a profile when they log in.

Identify a User

Call once when a user logs in:

PyzeIdentity.setUserProfile(
  "user-123",                          // Unique user ID
  {                                    // Pyze profile attributes
    "email_id": "john@example.com",
    "first_name": "John",
    "last_name": "Smith"
  },
  {                                    // Custom attributes
    "department": "Sales",
    "region": "West"
  }
);

Update Profile

Modify attributes for an already-identified user:

PyzeIdentity.updateUserProfile(
  { "email_id": "john.smith@example.com" },
  { "region": "East" }
);

Clear Profile on Logout

Reset identity when user logs out:

PyzeIdentity.resetUserProfile();

Supported Profile Fields

Field Format Example
email_id string "user@example.com"
first_name string "John"
last_name string "Smith"
date_of_birth YYYY-MM-DD "1990-05-15"
phone string "+1-555-1234"
gender M/F/O/N/P/U "M"
country ISO-3166-1 alpha-2 "US"
language ISO-639-1 "en"
home_city string "San Francisco"
time_zone IANA timezone "America/Los_Angeles"

User Privacy

Opt Out of Tracking

Allow users to stop data collection:

Pyze.setUserOptOut(true);   // Stop collecting
Pyze.setUserOptOut(false);  // Resume collecting

Delete User Data

Permanently remove all user data from Pyze:

Pyze.deleteUser(true);

Advanced Configuration

Tracking Clipboard Data

Capture additional case data from the Pega clipboard.

Step 1: Identify the attribute key in the clipboard (must be a simple type like String or Number).

Step 2: Configure tracking:

  1. Go to Dev Studio β†’ Configure β†’ User Interface β†’ Web Analytics
  2. Click Settings β†’ App Data tab
  3. Click Add Item
  4. Enter the attribute name and key in format: pyWorkPage.ATTRIBUTE_NAME
  5. Click Submit
Web Analytics settings
× Web Analytics settings
Configure clipboard data
× Configure clipboard data

  1. Open Data types in Dev Studio
  2. Search for ConfigPyze
  3. Go to the Records tab
  4. Add a record with the attribute name and key in format: caseInfo.ATTRIBUTE_NAME
Constellation clipboard config
× Constellation clipboard config

Data Hashing

If the Pyze agent has been configured to collect sensitive data (such as email addresses, user IDs, or other PII), consider hashing the data before it is sent to Pyze. See the Data Hashing documentation for details.


Access Control

Control which users have Pyze enabled.

Mode Setting Result
All users (default) EnablePyzeByRole = false Everyone has Pyze enabled
By access group EnablePyzeByRole = true Only users with PyzePegaRole:EnablePyze role
Disabled Uncheck “Use web analytics” No one has Pyze enabled

Enable for Specific Access Groups

  1. Go to Records β†’ SysAdmin β†’ Dynamic System Settings
  2. Set EnablePyzeByRole to true
Enable by role
× Enable by role
  1. Add role PyzePegaRole:EnablePyze to desired access groups
Access group role
× Access group role

Disable Pyze Completely

  1. Go to Configure β†’ User Interface β†’ Web Analytics
  2. Uncheck Use web analytics
Disable Pyze
× Disable Pyze

Uninstalling Pyze

To completely remove Pyze from your application:

  1. Remove component: Open Application Definition, click Manage Components, remove Pyze Component
  2. Remove roles: Delete PyzePegaRole:EnablePyze from all access groups
  3. Unlock ruleset: Unlock the Pyze component and ruleset for editing
  4. Delete ruleset: Go to System β†’ Refactor β†’ RuleSets, delete PyzeIntegRS
  5. Delete component: Remove the component record
  6. Re-login to complete removal

API Reference

See the full Web API Reference for all available methods.

Method Description
PyzeEvents.postCustomEvent(name) Track a simple event
PyzeEvents.postCustomEventWithAttributes(name, attrs) Track event with attributes
PyzeEvents.startTimerForEvent(name) Start timing an event
PyzeEvents.postTimedEvent(name) Post timed event
PyzeIdentity.setUserProfile(id, pyzeAttrs, customAttrs) Identify a user
PyzeIdentity.updateUserProfile(pyzeAttrs, customAttrs) Update user attributes
PyzeIdentity.resetUserProfile() Clear user identity
Pyze.setUserOptOut(boolean) Toggle data collection
Pyze.deleteUser(boolean) Delete user data

Last modified 2025-12-18