内容quare TAG SDK
这套国家防范机制软件为开发者提供了一种标准化方式,以非阻塞方式从远程加载跟踪TAG 服务器。 依据 内容等量 SDK。 。 。 .
内容quare是一个分析平台,帮助企业了解并优化其网站和移动应用程序的用户体验. 它通过热映射、会话录音和行为分析提供可操作的洞察力,使企业能够确定需要改进的领域并增强网站的整体业绩。 通过方便用户的界面和强大的数据可视化,Concessquare使数据驱动的决策能够促进转换并增强客户的参与.
安装
使用国家防范机制安装软件包:
npm install --save @contentsquare/tag-sdk
如何使用内容方块标记
先决条件
在使用 Contentquare 标记前,请确定您有以下内容:
- 目录账户:需要客户ID或站点ID. 如欲获取,请访问官方网站(英语:https://www.contentsquare.com/ (中文(简体) )) (中文(简体) ).
使用内容方块标记的步骤
遵循以下步骤在您的网站上使用内容quare标签 :
-
包含内容方块脚本:在您网站的Javascript/Typescript中,使用所提供的客户端ID来添加内容quare脚本.
打电话
injectContentsquareScript函数,其选项如下:.
-
如果你有一个
clientId数字 :// Replace 'YOUR_CLIENT_ID' with your actual Contentsquare Client ID injectContentsquareScript({ clientId: "YOUR_CLIENT_ID", async: true, // Optional: Prefer async execution to avoid blocking the DOM when executing the script. defer: false, // Optional: Set to true to defer script execution until after the DOM is fully built (before the DOMContentLoaded event). integrity: "YOUR_SCRIPT_INTEGRITY_HASH", // Optional: Provide the integrity hash for script security (if required). }); -
如果你有一个
siteId数字 :// Replace 'YOUR_SITE_ID' with your actual Contentsquare Site ID injectContentsquareScript({ siteId: "YOUR_SITE_ID", async: true, // Optional: Prefer async execution to avoid blocking the DOM when executing the script. defer: false, // Optional: Set to true to defer script execution until after the DOM is fully built (before the DOMContentLoaded event). });该函数将把内容quare脚本附加到文档中。 头,并将根据所提供的选项相应取出并执行.
- 使用量:请参见 内容文件 关于使用Contentquare标签的更多信息.
API 参考
injectContentsquareScript(scriptOptions)
将内容quare 脚本注入文档.head.
scriptOptions: 插入脚本的选项.clientId(弦声) - (如果没有网站,则需要 (d) 国家 Contentquare以"a6f73d509"的形式提供的客户端ID.siteId(弦声) - (如果没有客户要求) (d) 国家 站点ID是12345形式的数字ID.defer(boolean) - (optional) 表示脚本是否平行取取,并在文档解析后进行评估. 默认为false。 。 。 .async(boolean) - (可选) 表示脚本是否平行取取并尽快评估. 默认为true。 。 。 .integrity(弦) - (可选) 内容quare脚本的完整散列(SRI). 必须是Contentquare产生的.
回返: 附加到的、代表内容quare脚本的脚本元素 document.head。可用于进一步操纵或跟踪装载状态.
限制
- 这种拖曳模式只能用于现代“Contentsquare 部署”模式(不支持 Clicktale 或任何其他遗留模式).
- 包内的一些功能会包括内置描述/类型,以便于使用,但并非所有功能都包括在内. 请参看官员 内容文件 关于现有功能及其使用情况的更多信息.