Make it easy.
In most of the custom built CMS projects that we do for my clients, their users have a very limited technical understanding, but not necessarily technical programming skills.
Some of the different things we've done over the years:
If you make the site interact with the user and try to autofill or provide suggestions based on the "code" they're writing, you could potentially have the best results from a user experience standpoint. In this example, the colon is the cursor. On pause you could show a pop-up based on prior context.
Develop a very simple core scripting language that is parsed into code. Then you would build your interpreter to change this plain language dialog into code. For example take a look at applescript. This prevents the users from breaking the code by adding their own real closing tags.
You could make it say something like:
Set user property with price 100 in currency
US and add custom field "name" with value of "ABC"
Then it would generate this by dynamically pulling their ID:
For some of our clients we have a prefilled code box that shows potential code, but they need to understand the code and the we also have to provide a coding language reference (much harder to maintain and keep up to date when there is a major revision).
We've tried to buttons to automatically inject tags into real code, but the users sometimes inject attributes outside of the code tags, or they are placed into the wrong places. This requires a much more technical user.
A combination of the first two would be an excellent interface that anyone could use. You'll also want to provide examples of the language and let the users know that they will see pop-ups when they're writing. Give them options to delay the pop-up or disable it altogether if the language is simple enough.