I have several symfony apps (different vhosts) with the same skin, i.e. layout.php. I have one instance of the layout.php and asset files "someplace," and I symlink them into each app.
I would like to use Google Analytics with these apps, which requires each app to include its own key. How can I inject it into the layout.php?
Best answer I could come up with is to 开发者_StackOverflow中文版set the analytics JS code as a slot in myActions::preExecute() and extend sfActions. Anyone have a better idea?
Many thanks!
Why not just use an sfConfig value to set the tracker id? Then the value can be configured in the app.yml file for each app.
加载中,请稍侯......
精彩评论