lokalnyi/loki
Composer 安装命令:
composer require lokalnyi/loki
包简介
PHP SDK for conversion rate enhancement technology and adaptive response to user activity on a web page.
README 文档
README
This technology serves as a powerful tool for enhancing the user experience on web pages, allowing sites to adapt to individual users and their needs. Key components of the technology:
Page Blocks: Each page contains a certain number of blocks, with each block having three versions.
Analytical Part: Gathers information about users visiting the page:
- User's device type.
- Browser used.
- User's origin.
- Time spent on a particular block.
- Number of clicks/taps on a block.
A/B Testing: The first 200 users are provided with a random distribution of blocks to determine user reactions to different versions of blocks.
Heuristic Algorithm: After analyzing the behavior of the first 200 users, the algorithm creates a "snapshot" of the page best suited to a particular type of user. From 200 to 500 users.
Behavioral Algorithm: From 500 to 2000 users.
Neural Network: From 2000 users onwards.
This heuristic algorithm is developed for the adaptive display of content blocks on a website.
Taking into account the personal characteristics of the user.
Its main stages:
User Analysis: When a user visits the site, the algorithm collects information about their location and "user agent" (technical information about the browser and user device).
Data Filtering: Based on the collected "user agent", the algorithm searches for similar users in the database and selects those records that most closely match the current user.
Block Analysis: The algorithm then analyzes which blocks and their versions most frequently interacted with similar users.
Blocks Reformatting: After analyzing the blocks, the algorithm filters and sorts them. Content deemed unnecessary or less relevant is filtered out. The blocks are then sorted so that the user sees the most relevant and interesting content.
Content Display: The user receives a web page with sorted content blocks, optimized specifically for them based on the analysis of their location and device.
Advantages of the technology:
Increased Conversion: Thanks to the individual approach to each user, conversion can double.
Optimized Site Engagement Time: Adaptive content can encourage the user to spend more time on the site, enhancing their engagement.
Usage
To use the library, you need to follow a few steps:
-
Include the JavaScript Script for User Behavior Analytics:
The script can be found in theassets/js/*folder. There are three versions of the script: plain JavaScript, Vue.js, and jQuery. Feel free to use any of them as per your requirement. -
Collecting Statistics in Two Aspects:
- Collect data when a user makes a conversion.
- Collect analytics when a user simply visits your resource. Here's how you can use the LokiHandler:
use Loki\LokiHandler; // For posting statistics LokiHandler::postStatistic($params); // For posting analytic statistics LokiHandler::postAnalyticStatistic($params);
You can find examples of proper $params validation in tests/LokiTest::testPostStatistic.
- Sending Statistics to the Main Server Once a Day:
You can configure this according to your scheduler. The data is saved automatically when using the previous method. The saved data from session.json is then sent for processing:use Loki\LokiHandler; LokiHandler::sendStatistic();
- To Retrieve Aggregate Data for Your Web Resource:
You need to make a request to get the page blocks:use Loki\LokiHandler; LokiHandler::getPageBlocks($params);
Examples of validation data can be seen in tests/LokiTest::testGetPageBlocks, and you can also find an example response there.
Note: If you have any questions or suggestions, please feel free to reach out to us at ggommenn@gmail.com.
lokalnyi/loki 适用场景与选型建议
lokalnyi/loki 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 11 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 lokalnyi/loki 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lokalnyi/loki 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 27
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-11-09