服务器端Google Analytics实验 [英] Server-side Google Analytics Experiments
问题描述
我想知道为什么当我运行实验服务器端时,必须包含JavaScript cxApi。此外,我可以通过PHP发送所选的实验和变体吗?
或者可以通过注入一个没有外部资源的JavaScript片段(如cxApi)。
我在前端和后端使用Universal Analytics
b $ b https://github.com/thomasbachem/php-gacx他们在服务器端解析cxApi响应并更新cxApi cookie。
另请参阅此评论:
https:// github .com / thomasbachem / php-gacx / issues / 4
希望它有帮助
I'm wondering why I have to include the JavaScript cxApi when I'm running the experiments server-side. Furthermore, can I send the chosen experiment and variations by PHP? Or maybe by injecting a JavaScript snippet without external resources (like the cxApi).
I'm using Universal Analytics on the front-end and on the back-end.
Take a look at this library: php-gacx (Server-Side Google Analytics Content Experiments PHP Client) https://github.com/thomasbachem/php-gacx
They parse cxApi response on server-side and update cxApi cookie. Also take a look at this comment: https://github.com/thomasbachem/php-gacx/issues/4
hope it helps
这篇关于服务器端Google Analytics实验的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!