Adding token in the views header and footer
The "Use replacement tokens from the first row" checkbox is essential. It works with either the "Global: Text Area" option or "Global: Unfiltered text." Here is a screenshot of both working: