Ning Developer Network

Ning Developer Admin

Introduction to Tracking Code Hacks

Introduction

You may have noticed the tracking code feature that we provide on the Manage page of your social network. While the primary intention of this box is to allow you to use your third party tracking code, such as Google Analytics, it's capable of much more.

By allowing you to append any PHP or JavaScript to the footer of your social network, it's the key to customizing your social network without requesting access to your source code. If you've ever used GreaseMonkey for Mozilla Firefox before, you probably already understand this.

When to use Tracking Code Hacks

You should consider using these hacks to customize a social network if any of the following apply to you:

  • You'd like to customize your social network further than is possible with CSS and the built in configuration tools, but you'd also like to continue to automaticaly receive updates and bug fixes.
  • You're excited about developing on your social network, but not quite ready to dive into the PHP code that runs your social network

Show Me Some Examples of Hacks!

Pointing the Forum link to an external forum

Just replace http://yoursite.com below with the address of your forum:

<script type="text/javascript">
var forumList = document.getElementById('xg_tab_forum');
var anchor = forumList.getElementsByTagName('a')[0];
anchor.href = 'http://yoursite.com';
</script>

Relinking the header graphic to an external site

Just replace http://yoursite.com below with the address you want the header to link to:

<script type="text/javascript">
var headerLink = document.getElementById('application_name_header_link');
headerLink.href = 'http://yoursite.com';
</script>

Make the Tracking Code form box bigger :-)

This one is a personal favorite:

<script type="text/javascript">
if (document.getElementById('pageEnd')) {
document.getElementById('pageEnd').rows = "20";
document.getElementById('pageEnd').cols = "58";
}
</script>

Check our our list of existing tracking code hacks and our simple instructions for installation.

Is There Anything Else I Need to Know?

Yes!

These tracking code hacks are called hacks for an important reason! These are not full blown features and as a result they may not be tested with all web browsers. Furthermore, many of them may step on each others' toes when used at the same time. In other words, if you install one and see something strange, start your troubleshooting by removing it.

Last updated by Ning Developer Admin Sep 9.

Documentation & Tips

© 2008   Created by Ning Developer Admin

Badges  |  Report an Issue  |  Privacy  |  Terms of Service