How to add an argument to a view programmatically?
You can use hook_views_pre_view and set arguments you want. For example

function hook_views_pre_view(&amp;$view, &amp;$display_id, &amp;$args) {
  if ($view-&gt;name == 'your_view_name') {
     $view-&gt;set_arguments(array('arg1', 'arg2'));
  }
}