Introduction

This following tutorial will explain how you can add the Google Analytics service to your website. Google Analytics can provide you with traffic statistics for the website, such as the amount of page views received in a given time period, or what the most visited pages are.

Step 1 - Create an Analytics ccount

You will first need to log into your preferred Google account (Note: your analyitcs data will be tied to the account you sign up with - if one does not exist, you may wish to create an account for your office or committee, as opposed to using a personal account). Next, visit https://www.analytics.google.com, and click the 'Sign Up" button.

On the signup page, fill out the form with the appropriate website information.

Account Name: Enter a name of your choosing. This will be the name associated with the Analytics service.

Website Name: Enter the name of the website that will be used with the Analytics service.

Website URL: The address of the website (ex. "name.house.gov").

Industry Category: Select the most appropriate category for the site.

Reporting Time Zone: Select the most appropriate time zone for the website's traffic data logging. 

Next, click "Show Advanced Properties." Here, turn on the switch for "Create a Universal Analytics property" then select "https://" and enter the website url (ex. representative.house.gov). Finally, select "Create a Universal Analytics Property Only." 

Note: HillTop is not compatible with Analytics 4 and the Universal Analytics "UA-" number is currently required for tracking. An upgrade to Analytics 4 is expected to take place during the first half of 2023. More information on the Universal Analytics signup process is availble at https://support.google.com/analytics/answer/10269537?hl=en.

Step 2: Retrieve Tracking ID

Once you have signed up for the service and created a property, Google will provide a code snippet to add to your site. The only part of this snippet that is necessary is the Tracking ID, also referred to as a UA number. 

In the example snippet below, the Tracking ID is highlighed in bold red letters.

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-21965116-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>

 

Step 3 - Add the Tracking ID to HillTop

Copy the Tracking ID from the page or code snippet, then log into HillTop. Next, mouse over the "Site Tools" tab (located in the menu at the top of any HillTop page) and click "Site Settings." This will bring you to the Site Settings section.

Here, click "Google Analytics Settings," located under the "Modify Settings" header in the right sidebar. Paste the Tracking ID into the "Key" field, then click the "Submit" button to save your changes. Google Analytics has now been enabled, however it may take up to 24 hours for Google to begin providing statistics.

Statistics can be viewed by visiting https://www.analytics.google.com and logging in with the Google account that was used to register the site in Step 1. More information on the Google Analytics service is available at https://support.google.com/analytics/#topic=3544906.