Google Analytics

View setting

Exclude URL Query Parameters

 

How to place a code in the WordPress file (Reference here)

Place this in the Edit Themes / header.php

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-46103379-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-XXXXX');
</script>