jonnitto/smartlook

将 smartlook.com 集成到您的 Neos CMS 网站中

2.0.0 2022-04-05 14:56 UTC

This package is auto-updated.

Last update: 2024-09-05 20:25:48 UTC


README

Latest Stable Version Total Downloads License GitHub forks GitHub stars GitHub watchers GitHub followers Follow Jon on Twitter

Jonnitto.Smartlook

Smartlook 添加到您的 Neos CMS 网站

安装

通常,您需要调整包的一些小细节(例如 Settings.yaml 中的配置)。因此,将相应的包添加到从您的主题包的 composer 中非常重要。通常,这是位于 Packages/Sites/ 下的网站包。要正确安装,请转到您的主题包(例如 Packages/Sites/Foo.Bar)并运行以下命令

composer require jonnitto/smartlook --no-update

使用 --no-update 命令可以防止依赖项自动更新。在将包添加到您的主题 composer.json 后,返回 Neos 安装根目录并运行 composer update。就这样!您想要的包现在已经正确安装。

设置记录的 id

您需要在 Settings.yaml 文件中设置 id

Jonnitto:
  Smartlook:
    Id: 123456789012345678901234567890

您在 smartlook.com 注册后即可获得 id

自动处理 表单

插件自动为每个 表单 标签添加 data-recording-ignore="mask"。此行为可以通过 Settings.yaml 禁用

Jonnitto:
  Smartlook:
    ignoreForms: false

禁用特定页面的记录

如果您想禁用特定页面的记录,只需将变量 track 设置为 false 即可

prototype(Page).head.smartlook.track = false;

或者

renderPathPage.head.smartlook.track = false;

如果此变量设置为 false,则将添加 smartlook('disable',true); 到跟踪代码中。要禁用页面上的完整代码,您可以删除整个标签,例如:prototype(Page).head.smartlook >