0

カスタム変数がユーザー ログインでどのように機能するかわかりません。

私は以下のコードを持っています:

_gaq.push(['_setCustomVar',
          1,             // This custom var is set to slot #1.  Required parameter.
          'User Type',   // The name of the custom variable.  Required parameter.
          '{$smarty.get.user_group_id}',      // Sets the value of "User Type" to "Member" or "Visitor" depending on status.  Required parameter.
           2             // Sets the scope to session-level.  Optional parameter.
       ]);
    _gaq.push(['_trackPageview', '/subscribe-successful']);

このコードの前に Google Analytics コードが表示されます。

ユーザーがログインした後、このコードが表示されますが、それは問題ありませんが、コードはその後他のすべてのページに表示する必要がありますか、それとも一度表示するだけで残りを追跡できますか?

4

1 に答える 1

1

1 回呼び出すと、ユーザー セッション全体に影響します。そのため、スコープ変数は 2 == セッション レベルに設定されています。

于 2013-01-22T13:28:58.690 に答える