If your site is already running through GTM, this is the cleanest way to add HitCounters. About 3 minutes.
ABC123DEF456GHI7).HitCounters Tracking CodeHitCounters - Tracker<!-- HitCounters.com -->
<script async src="https://hitcounters.com/api/tracker.js?code={{HitCounters Tracking Code}}"></script>
<noscript><img src="https://hitcounters.com/api/track.php?code={{HitCounters Tracking Code}}&noscript=1" alt="" style="display:none;"/></noscript>
To fire HitCounters events from a GTM trigger (form submit, button click, custom event), add another Custom HTML tag with this body:
<script>
if (typeof hcEvent === 'function') {
hcEvent('signup'); // event name from your Goals page
// hcEvent('purchase', 49.99); // with optional value
}
</script>
Then add a goal of type Event on your Goals page with the matching name. Conversions will appear in your dashboard within seconds.
script-src https://hitcounters.com.No problem — the regular snippet works on any site, and we have one-click installs for WordPress.
WordPress instructions Sign up free