首页 文章

如果我的Google Analytics在Google跟踪代码管理器中运行,如何设置Google Analytics实验?

提问于
浏览
4

当我在我的页面中设置Google Analytics实验时,我发现原始页面和变体页面都需要在其中写入实验代码和Google Analytics代码 .

在设置过程中,我发现实验需要我们在页面中包含Google Analytics代码和Google实验代码 . 如下:

enter image description here

这是问题:

我的Google Analytics(分析)是通过Google跟踪代码管理器设置的(Google跟踪代码管理器具有良好的用户界面,可让我构建我的所有GA帐户和Custome Dimension) . 所以我不需要在测试页面中编写任何GA代码 . 我知道Google实验无法在Google跟踪代码管理器中运行 .

我的测试页面中没有GA代码,因为GTM已经这样做了 .

How can I set up Experiments if my GA is set up in GTM?

要么

Google Experiments only can work in the page which has GA code inside?

1 回答

  • 0

    最后找到一个测试Session Duration的解决方案 . (至少它对我有用,所以你可以试试 . )

    Suppose your Google Analytics already set in your Google Tag Manager(New Version):

    1)首先,您需要确保在原始页面之后立即设置实验脚本标记 . 我的设置是 Session Duration100% 用户流量

    2)不关心实验说明在您的两个页面中找不到Google Analytics代码,请获取此测试的实验ID(Exp:123456789)并保存实验 .

    3)使用私人窗口打开原始页面serval次数,您将随机查看原始页面和新页面 .

    4)然后, after 4 hours (Yes, it is.) ,我终于得到了数据 .

    enter image description here

    If you want to test some specific tag or element on your page, you need to set up Tags and Triggers in your Google Tag Manager as below:

    1)首先,确认标签后应立即设置实验脚本标签 .

    2)创建一个触发器以检测您的原始页面URL,exp: Page URL 包含 myWebsite.com/experimentsTestPage

    3)创建一个Custome HTML标签来运行实验Api,exp:

    4)创建Custome HTML标记以配置pageVariation并运行它 . 经验:

    // Ask Google Analytics which variation to show the user. var chosenVariation = cxApi.chooseVariation(); console.log("here:" + chosenVariation); var pageVariations = []; pageVariations[chosenVariation]();

    将触发器设置为您在上面创建的触发器 .

    然后,当您打开原始页面时,您可以随机查看原始页面和变体页面 .

    REF:https://developers.google.com/analytics/solutions/experiments-client-side

相关问题