In Google Analytics you make choices that change what data gets passed into your reports. Understanding where and how those choices get made is important because they have a profound effect upon the accuracy of your reports.
In this post, I’ll focus on changes that determine the data set that gets passed into Google Analytics’ reports. In the next post I’ll take a look at how you can work with the data in the reports.
Background

In the Google Analytics hierarchy, you can alter the data set at the view level and by how the code is implemented.
Google Analytics follows a hierarchy of accounts, properties, views and reports. The account is the top-most level of organization.
Each account contains one or more properties. A property is associated with a unique tracking number. Within a property there are one or more views.
In the admin area you can change what data gets passed into the reports. For instance, at the view level you can add filters and set up goals and funnels. At the property level, you can set custom dimensions, which also require a code change.
Within the reports there are various ways to change how the data is reported that don’t alter the data itself. This includes segments, report filters and custom reports.
The data set is determined by how the code is implemented and by changes made at the view level. At the report level, you can manipulate how the data is displayed but you can’t change the underlying data set.
It is important to understand how changes at different points in the hierarchy impact the data because they have a profound effect upon the accuracy of your reports.
Determining Data
Tracking Code
Google Analytics assigns a unique code to each property. That code goes on the pages you wish to track if you are adding it directly to the site or you can add it using Google Tag Manager. Learn more about how to set up the tracking code.
Usually you will want to put the code on every page of your website. If you miss out pages then Google Analytics will not be able to track those pages. This sounds like an inconvenience but it can be fairly disastrous for your data.
For instance, when your visitors move from a tracked page to a non-tracked page it looks like they’ve left the site. If they then move back to a tracked page, they will appear as a new visitor. This will impact a range of metrics including the number of sessions, average time on site and bounce rate.
In the vast majority of cases, you’ll want to put your code on every page your visitors can access. If you don’t put it on every page, carefully consider how it will impact your data and how you can mitigate the results.
Filters
Within each property you can set up multiple views, each with different filters.
The best practice is to have one view which has no filters. This is because filters permanently alter your data. If you have a question that the filtered data can’t answer or there is an error in the filters, then you’ll need to go back to the view which has no filters.
I also recommend having at least one view for testing filters. This is to ensure that a new filter doesn’t accidentally destroy your data as the data is not recoverable. By running the new filter on a test view first you can make sure it does what you expect it to do.
Common filters include removing internal IP addresses, passing in sub-domains, or looking at sessions from specific sources.
Goals and funnels
At the view level you also set up goals and funnels.
A goal is used to track when a user completes an action, e.g. tracking when they visit a page or trigger a specified event. When setting up the goal you will also have the option of adding a funnel. A funnels tracks user behavior through a specific set of steps that lead to a goal.
A very common use case for funnels and goals is to track user behavior through a purchase flow where the last page of the purchase flow is the goal. The intent is to find out where users are dropping off during the purchase flow.
The goal and funnel information can be seen in the Google Analytics report associated with that view. Goals and funnels are not destructive. If you set up a goal or a funnel incorrectly, it won’t damage your underlying data but it may pass unusable data into your report.
eCommerce conversions
To enable eCommerce conversion tracking on your site you can use Google Tag Manager or add code to your conversion page, e.g. the last page of the purchase flow.
When conversion tracking is implemented correctly, Google Analytics will pass purchase information into your report. eCommerce tracking is extremely useful for tying site behavior to purchase information.
As with goals, if the eCommerce tracking is set up incorrectly, it won’t damage the rest of your data but it may pass in bad information.
Conclusion
The data that gets passed into your reports is determined at the view level and by how your code is implemented. If a mistake is made at this level you can’t recover the data.
In this post I focused on some of the most common ways to alter your data set. There are others, though, that I will explore in more detail in later posts.
In the next post, I will look at some of the ways you can work with data at the report level.
Update: Read the related post Google Analytics: Working with the data set.