1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 GetClicky Analytics w/ Xenforo

Discussion in 'XenForo Questions and Support' started by Israel, Mar 28, 2012.

  1. Israel

    Israel Member

    Does anyone use GetClicky analytics on their forum? If so, could you please let me know which code is best to use and where to put it to get it running on my forum?

    I use it on blogs, but it's a simple plug in. No clue where to start really here on Xenforo.

    Any help is appreciated, thanks.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    The FAQ explains where to add JS, which is presumably what you need to track the data.

    Where can additional JavaScript be placed?
    Additional JavaScript can be placed in the PAGE_CONTAINER, page_container_js_head or page_container_js_body templates. If PAGE_CONTAINER is used, it can be placed anywhere in the template. If page_container_js_head is used, it will be included in the head section of PAGE_CONTAINER. If page_container_js_body is used, it will be included in the body section of PAGE_CONTAINER, after the footer. It depends on the JavaScript to a large extent; some require to be placed in the head, some in the body.

    http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-181112
     
    Israel likes this.
  3. Israel

    Israel Member

    Thanks, Brogan, pasted the javascript code into page_container_js_body and it seems to be working well so far.
     
  4. akia

    akia Well-Known Member

    A little tip for you.

    Add

    Code:
    <xen:if is="{$visitor.user_id}">
    <script type="text/javascript">
      var clicky_custom = {};
      clicky_custom.session = {
        username: "{$visitor.username}",
      };
    </script></xen:if>
    just before the clicky code.

    It will allow you to track you members on the stats. so you can see them by name on the spy page etc.
     
    Israel likes this.
  5. Israel

    Israel Member

    Awesome, will definitely try this, thanks!
     
  6. Israel

    Israel Member

    akia, that code is working like a charm! I'm getting so much insight into what people are doing on the forum...it almost feels wrong!
     
  7. akia

    akia Well-Known Member

    Glad you've found it useful. :D
     
  8. AngrySalad

    AngrySalad New Member

    Great code, it was working for a while, but I'm guessing that it only works with Clicky's Premium feature?
     
  9. LuvMeSumZen

    LuvMeSumZen Active Member

    Another old thread I am dragging up but the shoe fits so . . .

    The latest code installation instructions from the Clicky website says to intall it in the header or the footer and I am choosing the footer (though I don't know why since it isn't visible). My question is should I add it to the footer template or the footer.css template?
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

  11. LuvMeSumZen

    LuvMeSumZen Active Member

    I saw that and followed those instructions, but when I did, about 2 inches of code was suddenly visible below the footer of my site so I removed it.
     
  12. Brogan

    Brogan XenForo Moderator Staff Member

    Paste your edited template code here.
     
  13. LuvMeSumZen

    LuvMeSumZen Active Member

    You mean the code from the page_container_js_head plus the tracking code where I had it?
     
  14. LuvMeSumZen

    LuvMeSumZen Active Member

    Just let me know which edited code you want me to paste and I will - not exactly sure what you want.
     

Share This Page