That code should be placed in functions.php of your theme (oc_content/themes/theme_name/functions.php), but it still does nothing. Could you provide your tracking code? Without it I don't know how you should implement it. If it's Javascript you can just do this:
<?php
function trackingCode($userId) {
echo "my tracking JS";
}
osc_add_hook('user_register_completed', 'trackingCode');
?>
Regards.