Variable overrides

Variable overrides let you change Analytics values for a single hit without affecting existing variables on the page.


  1. Create a new JavaScript object. The object name can be anything you want.

    code language-js
    var y = new Object();
  2. Assign valid Analytics properties to this object:

    code language-js
    y.eVar1 = "New value"; = "event2";
  3. Use the object as an argument within the appropriate tracking call:

    code language-js
    // Use the override object in a standard page view call
    // Use the override object in a link tracking call,'o','Example override link',y);

When a tracking call receives an object in the overrides parameter, all valid values in the override object overwrite values in the standard Analytics object. Variables already defined in your existing Analytics object are not affected.