capacitor-plugin-pointzi
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

Pointzi Capacitor Plugin

How to install:

Step 0: Dependencies

Install dependencies for Pointzi plugin.

npm i com.darktalker.cordova.screenshot
npm i cordova-plugin-app-version
npm i cordova-plugin-device
npm i cordova-plugin-device-name
npm i cordova-plugin-dialogs
npm i cordova-plugin-network-information

Step 1: Install plugin

Install Pointzi in your Cordova project. Run this command in a console.

npm i capacitor-plugin-pointzi

Step 2: Setup assets

You need copy asset files of plugin into your dist folder with following structure "/capacitor-plugin-pointzi/assets/". For example:

You can do that by edit your build configuration file. Assume that you are using angular, so you put this code into assets configuration section inside angular.json:

{
  "glob": "**/*",
  "input": "node_modules/capacitor-plugin-pointzi/src/assets",
  "output": "./capacitor-plugin-pointzi/assets"
}

When you have done, it looks like:

{
  "projects": {
    "app": {
      "architect": {
        "build": {
          "options": {
            "assets": [
              {
                "glob": "**/*",
                "input": "node_modules/capacitor-plugin-pointzi/src/assets",
                "output": "./capacitor-plugin-pointzi/assets"
              }
            ]
          }
        }
      }
    }
  }
}

Step 3: Init Pointzi service

Add code into constructor of your root component. For example, assumed you use angular, your root component file is app.component.ts.

import { Plugins, StatusBarStyle } from '@capacitor/core';
import 'capacitor-plugin-pointzi';
 
const { Pointzi } = Plugins;
 
export class AppComponent {
  constructor(private platform: Platform) {
    this.initializeApp();
  }
 
  async initializeApp() {
    Pointzi.load().then(function () {
      Pointzi.register(APP_KEY, CUID).then(function () {
        // Send String Tag
        Pointzi.tag({
          key: 'first_name',
          string: 'My First Name',
        });
      });
    });
  }
}

Note: To get your APPKEY, go to dashboard.pointzi.com, it is name on the Top left. CUID is the name you want to give to your install-id. This name is up to you. For more info visit, Tagging documentation

Dependents (0)

Package Sidebar

Install

npm i capacitor-plugin-pointzi

Weekly Downloads

0

Version

0.0.5

License

MIT

Unpacked Size

1.43 MB

Total Files

31

Last publish

Collaborators

  • streethawk-ci