Jimmy (scenejournal) wrote in lj_dev,
Jimmy
scenejournal
lj_dev

Adding Analytics Code To Journals

Hello,

I am interested in adding some analytics (Google/Mint) code into journals. I've figured out how to add it into the main site (very simple), but getting into journals is proving to be a bit more difficult. I am not sure if I have to edit each s1 and s2 theme or if there's some place where I can place it once and be done with it.

Any help is much appreciated!

Thanks!

Update: Figured it out! For S2 stuff, edit the file /cgi-bin/LJ/S2.pm. I stuck it in around line 1957, seems to work fine :) As for S1, that took some poking around, but it seems /cgi-bin/ljviews.pl does the trick, I inserted this code:

$lastn_page{'head'} .= qq{YOUR SCRIPT CODE \n};

around line 1106 and it seems to be working as well, hopefully this helps someone!
Tags: server, server: code, server: s2
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 3 comments