跳过主要内容
返回插件
@capgo/capacitor-contentsquare
教程
由 github.com/Cap-go

Contentsquare

在 Capacitor 中集成 Contentsquare 移动分析、同意门控、屏幕跟踪、交易和会话回放控制

指南

Contentsquare的教程

使用@capgo/capacitor-contentsquare

Capacitor内部本地桥接协议实现

安装

bun add @capgo/capacitor-contentsquare
bunx cap sync

此插件暴露的内容

  • optIn
  • optOut
  • sendScreenName
  • sendTransaction

示例使用

optIn

查看当前协议的上游定义

import { Contentsquare } from '@capgo/capacitor-contentsquare';

await Contentsquare.optIn();

optOut

查看当前协议的上游定义

import { Contentsquare } from '@capgo/capacitor-contentsquare';

await Contentsquare.optOut();

sendScreenName

查看当前协议的上游定义

import { Contentsquare } from '@capgo/capacitor-contentsquare';

await Contentsquare.sendScreenName({} as { name: string });

sendTransaction

查看上游定义以获取当前合同的定义。

import { Contentsquare } from '@capgo/capacitor-contentsquare';

await Contentsquare.sendTransaction({} as TransactionItem);

全局参考