Yes, you can use the Beam code in whatever way you see fit. We have designed the Beam code block to accept variables from most scripting languages used on the net today.
For detailed imnformation download our Beam Integration Guide (812KB PDF)
For sites that have multiple Beams on one page, we have a version of the code block that will reduce the loading time. Below is an example of what this version of the Beam code looks like: