1

I'm using the popular jquery address with an ajax app. I want google analytics to record path hash changes, as those are the equivalent of new pages for me.

The address documentation mentions GA, but I don't understand how to use it?

http://www.asual.com/jquery/address/docs/

This also mentions the feature but doesn't explain how to do tracking: jquery deep linking - how does it effect analytics?

Do I still reference the google urchin js on my html page? Below or after address? Is the function the function that causes the page change? Can I put $.address.change() in it?

4

1 に答える 1

2

Google アナリティクス コードが含まれている限り、プラグインは自動的にトラッキングを行います。コードのすべてのバリアント (urchin、pageTracker、async) をサポートしますが、重要な点が 2 つあります。

  1. プラグインの前に GA コードを含める必要があります。これは、プラグインが追跡スクリプトを検出できるようにするために必要です。
  2. 「」が追跡されるトラッキング コードの最後の行を削除する必要があります。プラグインはこれを自動的に呼び出し、ウェブサイトがディープリンクを使用して入力された場合、適切な値を使用します。

asual.com のすべての jQuery Address サンプルはこの追跡機能を使用しており、そのソースを参照として使用できます。

于 2010-12-02T07:26:04.937 に答える