Variable overrides

Last update: 2024-01-25
  • Created for:
  • Developer

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.

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

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

    // 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.

On this page