Skip to main content
Tweeted twitter.com/#!/StackWebmasters/status/487878334668611585
Clarifications for improved understanding.
Source Link
dan
  • 15.2k
  • 11
  • 45
  • 52

Google Analytics: what What is the different between these 2 _gaq.pushtwo sets of Google Analytics tracking code?

John CondeDoesDoes anyone know the different between these 2 codestwo sets of code for Drupal Google Analytics module? Which one should is correct? I found these codes from wesjones.net and Google.

PS: The 2nd one is from google.com with "b.".

Code 1:

beforebefore

_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);

afterafter

_gaq.push(["_setAccount", "UA-XXXXX-X-2"]);
_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);
_gaq.push(["_trackPageview"]);

Code 2:

beforebefore

_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);

afterafter

_gaq.push(["b._setAccount", "UA-XXXXX-X-2"]);
_gaq.push(["b._setDomainName", "none"]);
_gaq.push(["b._setAllowLinker", true]);
_gaq.push(["b._trackPageview"]);

I found these codes from here and from Google; the 2nd one is from Google with "b."

Google Analytics: what is the different between these 2 _gaq.push code?

John CondeDoes anyone know the different between these 2 codes for Drupal Google Analytics module? Which one should is correct? I found these codes from wesjones.net and Google.

PS: The 2nd one is from google.com with "b.".

Code 1

before

_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);

after

_gaq.push(["_setAccount", "UA-XXXXX-X-2"]);
_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);
_gaq.push(["_trackPageview"]);

Code 2

before

_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);

after

_gaq.push(["b._setAccount", "UA-XXXXX-X-2"]);
_gaq.push(["b._setDomainName", "none"]);
_gaq.push(["b._setAllowLinker", true]);
_gaq.push(["b._trackPageview"]);

What is the different between these two sets of Google Analytics tracking code?

Does anyone know the different between these two sets of code for Drupal Google Analytics module? Which one is correct?

Code 1:

before

_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);

after

_gaq.push(["_setAccount", "UA-XXXXX-X-2"]);
_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);
_gaq.push(["_trackPageview"]);

Code 2:

before

_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);

after

_gaq.push(["b._setAccount", "UA-XXXXX-X-2"]);
_gaq.push(["b._setDomainName", "none"]);
_gaq.push(["b._setAllowLinker", true]);
_gaq.push(["b._trackPageview"]);

I found these codes from here and from Google; the 2nd one is from Google with "b."

added 10 characters in body
Source Link

DoesJohn CondeDoes anyone know the different between these 2 codes for Drupal Google Analytics module? Which one should is correct? I found these codes from wesjones.net and Google.

PS: The 2nd one is from google.com with "b.".

Code 1

before

_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);

after

_gaq.push(["_setAccount", "UA-XXXXX-X-2"]);
_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker”["_setAllowLinker", true]);
_gaq.push(["_trackPageview"]);

Code 2

before

_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);

after

_gaq.push(["b._setAccount", "UA-XXXXX-X-2"]);
_gaq.push(["b._setDomainName", "none"]);
_gaq.push(["b._setAllowLinker”_setAllowLinker", true]);
_gaq.push(["b._trackPageview"]);

Does anyone know the different between these 2 codes for Drupal Google Analytics module? Which one should is correct? I found these codes from wesjones.net and Google.

PS: The 2nd one is from google.com with "b.".

Code 1

before

_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);

after

_gaq.push(["_setAccount", "UA-XXXXX-X-2"]);
_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker”, true]);
_gaq.push(["_trackPageview"]);

Code 2

before

_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);

after

_gaq.push(["b._setAccount", "UA-XXXXX-X-2"]);
_gaq.push(["b._setDomainName", "none"]);
_gaq.push(["b._setAllowLinker”, true]);
_gaq.push(["b._trackPageview"]);

John CondeDoes anyone know the different between these 2 codes for Drupal Google Analytics module? Which one should is correct? I found these codes from wesjones.net and Google.

PS: The 2nd one is from google.com with "b.".

Code 1

before

_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);

after

_gaq.push(["_setAccount", "UA-XXXXX-X-2"]);
_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);
_gaq.push(["_trackPageview"]);

Code 2

before

_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);

after

_gaq.push(["b._setAccount", "UA-XXXXX-X-2"]);
_gaq.push(["b._setDomainName", "none"]);
_gaq.push(["b._setAllowLinker", true]);
_gaq.push(["b._trackPageview"]);
Source Link

Google Analytics: what is the different between these 2 _gaq.push code?

Does anyone know the different between these 2 codes for Drupal Google Analytics module? Which one should is correct? I found these codes from wesjones.net and Google.

PS: The 2nd one is from google.com with "b.".

Code 1

before

_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);

after

_gaq.push(["_setAccount", "UA-XXXXX-X-2"]);
_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker”, true]);
_gaq.push(["_trackPageview"]);

Code 2

before

_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);

after

_gaq.push(["b._setAccount", "UA-XXXXX-X-2"]);
_gaq.push(["b._setDomainName", "none"]);
_gaq.push(["b._setAllowLinker”, true]);
_gaq.push(["b._trackPageview"]);