I need to set google analytics script for layout on all pages, except one. So I call
$scripts = $this->Script->getUniversalScript();
$this->set(compact(‘scripts’));
in AppController beforeFilter
And
$scripts = $this->Script->getSpecificScript();
$this->set(compact(‘scripts’));
in SpecificController action, where I need specific google analytics script. I also have specific logic there so I cannot do it in AppController by taking controller name and action name. But it doesn´t work, because set() method in controller always takes value, which was first set (in AppController) and I need take last set (in SpecificController). Is there any way to make it? Thank you for any advice.