The positioning of the JavaScript depends on whether you are using tag manager.
No Tag Manager
For no tag manager, place the tracking script in the <head>
of the HTML. This will ensure the dynamic numbers switch across faster.
Google Tag Manager
In Google Tag Manager, configure a new tag of type Custom HTML Tag and paste the entire script, including the <script>
tags, in the HTML field. Set the script to run on every page.
Other Tag Manager
For other tag managers, configure the tracking script to execute as soon as possible.