ÃÛ¶¹ÊÓƵ

Variable overrides

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

Workflow

  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";
    y.events = "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
    s.t(y);
    
    // Use the override object in a link tracking call
    s.tl(this,'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.

recommendation-more-help
b4f6d761-4a8b-4322-b801-c85b9e3be690