Page MenuHomePhabricator

How to add "google analystics" to phabricator ?
Closed, InvalidPublic


I want to add "Google Analystics" to my phabricator instance.

But, It is difficult to find target (php source) to add analystics javascript as suggested method by google.

(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

ga('create', 'XX-XXXXXX-XX', 'auto');
ga('send', 'YYYYY');

I read and

  1. made javascript to .js file,
  2. locate $PHABRICATOR/webroot/rsrc/js/google/analystics.js and
  3. generate new map,
  4. run

But I don't know where to add require_celerity_resource() function call.

I just want all pages would include that .js

Any suggestions?

PS. I try to use preamble.php, but if I put that javascript code before <!DOCTYPE html>..., phabricator working not properly.


Event Timeline

seungrye created this task.Jan 9 2015, 5:18 AM
seungrye raised the priority of this task from to Wishlist.
seungrye updated the task description. (Show Details)
seungrye added a subscriber: seungrye.
chad closed this task as Invalid.Jan 9 2015, 5:24 AM
chad claimed this task.
chad added a subscriber: chad.

I'd fork Phabricator and modify

(This isn't something we can provide additional support for here).

@chad // thanks always.

eadler updated the task description. (Show Details)Jan 26 2016, 6:20 PM
eadler added a subscriber: eadler.
eadler removed a subscriber: eadler.