Socket
Book a DemoInstallSign in
Socket

capacitor-plugin-pointzi

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capacitor-plugin-pointzi

Poinzi Capacitor Plugin

latest
npmnpm
Version
0.0.5
Version published
Maintainers
1
Created
Source

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:

  • https://localhost/capacitor-plugin-pointzi/assets/example.png

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

Keywords

capacitor

FAQs

Package last updated on 17 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts