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 angulartics2 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 angulartics2 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 angulartics2 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 angulartics2 Guide.

a. Paste the following JavaScript code between the <head> and </head> tag of you index.html file of your angular application.

<!-- 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 -->

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

c. Import Pyze provider in the root component.

import { Angulartics2Module } from 'angulartics2';
import { Angulartics2Pyze } from 'angulartics2/pyze';

d. Call startTracking() to start the tracking of route changes.

@Component({  ...  })
export class AppComponent {
  constructor(angulartics2Pyze: Angulartics2Pyze) {
    angulartics2Pyze.startTracking();
  }
}

e. Check Setup Angulartics using Angulartics2Pyze for more details

Build and Go!