0
Welcome Guest! Login
0 items Join Now

I wish to track outbound links

    • MLWW's Avatar
    • MLWW
    • Newbie
    • Posts: 4
    • Thanks: 0

    I wish to track outbound links

    Posted 13 years 1 month ago
    • Google says to place the following code after the normal Analytics tracking code:

      <script type="text/javascript">
      function recordOutboundLink(link, category, action) {
      try {
      var pageTracker=_gat._getTracker("UA-XXXXX-X");
      pageTracker._trackEvent(category, action);
      setTimeout('document.location = "' + link.href + '"', 100)
      }catch(err){}
      }
      </script>

      When I look at the Main Page template (syndicate) the code is pulled from elsewhere. In what file would I find the Google code and place this additional code?

      Thanks in advance for any help!
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: I wish to track outbound links

    Posted 13 years 1 month ago
    • Copy "analytics.php" from the features folder of the gantry core (depends on the J! version you are using) into the features folder of your template and change it for your needs ...
    • MLWW's Avatar
    • MLWW
    • Newbie
    • Posts: 4
    • Thanks: 0

    Re: I wish to track outbound links

    Posted 13 years 1 month ago
    • Henning wrote:
      Copy "analytics.php" from the features folder of the gantry core (depends on the J! version you are using) into the features folder of your template and change it for your needs ...

      Thank you! I will check this out.

      And thank you too for being so quick to help a novice :-)

Time to create page: 0.269 seconds