if you dont want to place the plugin more then once per page, you can set the uid in fluid.
<script>var yourUid = {uid}</script>
And it will be present in the javascript file.
You can test that with alert( yourUid );
(or console.log, if you use it)
Tim