simplifying-google-analytics-configuration-with-google-tag-manager

Google Analytics is a crucial part of any online marketer’s toolbox. Getting analytics data starts with a proper installation of the tracking code. Thankfully, Google Tag Manager makes this process simple, even when modifications to the Analytics code are required.

Google Tag Manager (GTM) allows you to deploy Google Analytics tracking without adding any further code to your website. Extensive configuration options allow you to tweak the setup based on your needs.

In this article, I’ll cover how to set up Google Analytics through GTM, along with some tips for customization based on your needs.

Installing a global Google Analytics tag

Navigate to your desired GTM account and container. From the Overview screen, select “Add a new tag.”

Page Analytics Chrome extension, which allows you to visualize click data for links on your site. You can see how many clicks occurred on each link, as well as what percentage of total clicks for a page went to each.

Unfortunately, by default, this report groups together counts for any links going to the same URL. So if you link to the same URL from both a top navigation bar and your site’s footer, each link will show the same click count.

Thankfully, a simple setting change allows you to differentiate between clicks on different elements. When editing your Google Analytics variable, look for the “More Settings” option below where you entered your Tracking ID.

Within the options that appear, click “Advanced Configuration.” You’ll now see a dropdown labeled “Enable Enhanced Link Attribution.” Select “True” here.

here.



About The Author

document.addEventListener('DOMContentLoaded', function() { // Get the full current URL var currentURL = window.location.href; // Check if the path includes /wp-login.php or /wp-admin/ if (currentURL.indexOf('/wp-login.php') === -1 && currentURL.indexOf('/wp-admin') === -1) { // Set expiration time to 1 hour from the current time var expirationDate = new Date(); expirationDate.setTime(expirationDate.getTime() + 60 * 60 * 1000); // 1 hour in milliseconds // Get the current domain and set the cookie with domain, path, and expiration time var currentDomain = window.location.hostname; document.cookie = 'ppc_last_visited_page=' + currentURL + '; path=/; domain=' + currentDomain + '; expires=' + expirationDate.toUTCString(); } });