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

Where do I install a script for tracking pages copied?

Discussion in 'XenForo Questions and Support' started by Core Freedom, Jun 14, 2013.

  1. Core Freedom

    Core Freedom Well-Known Member

    Hi All,

    I'm trying to copy this script to track what pages and things are being copied from my site. In WP I would put this in editor/header and before </head> but in XF I don't know where to put it. Help?

    Thank you!

    <!-- BEGIN Tynt Script -->
    <script type="text/javascript">
    if(document.location.protocol=='http:'){
    var Tynt=Tynt||[];Tynt.push('bVWVGQ1uer4OL3acwqm_6l');
    (function(){var s=document.createElement ('script');s.async="async";s.type="text/javascript";s.src='http://tcr.tynt.com/ti.js';var h=document.getElementsByTagName ('script')[0];h.parentNode.insertBefore(s,h);})();
    }
    </script>
    <!-- END Tynt Script -->
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    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
     
    Core Freedom likes this.
  3. Core Freedom

    Core Freedom Well-Known Member

    oh, oh - way too risky for me. Will get some help with this. Thank you, Brogan.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    It's a simple template edit.

    Just add the code to the page_container_js_head template.
     
    Tracy Perry and Core Freedom like this.
  5. Core Freedom

    Core Freedom Well-Known Member

    Ah, now this I understood. :) I placed it right after whatever was in that js_head template.
     

Share This Page