Tracking external links

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Andy Huang
    Senior Member
    • Feb 2004
    • 4602

    Tracking external links

    Hi there;
    I have a forum acting as a link to another site, I would like to include some google analytics tracking by adding the following to the herf:

    Code:
    onclick="javascript:urchinTracker ('/outgoing/example_com');"
    is this possible to do via template edit? and if so, which template should I edit?

    I tried to search for this but I don't seem to be getting any relevant results, so I figured I'd ask. Sorry if there's already a thread on this.
    Best Regards,
    Andy Huang
  • Colin F
    Senior Member
    • May 2004
    • 17689

    #2
    You could do this:
    Edit your forumhome_forumbit_level1_post
    and forumhome_forumbit_level2_post templates.

    Find:
    Code:
    <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"
    Add after:
    Code:
    <if condition="$forum[forumid] == XX">
    onclick="javascript:urchinTracker ('/outgoing/example_com');"</if>
    Replace XX with the forumid of the forum link.
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment

    • Andy Huang
      Senior Member
      • Feb 2004
      • 4602

      #3
      Awsome, thanks!
      Best Regards,
      Andy Huang

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...