Return to the Measuring Data Use report online or download the PDF version with these Annexes.
Annex 1: Recommendations for Improving Web Traffic Data
The process of analyzing web traffic data for ten NSO websites and data portals revealed a number of opportunities to further improve the quality of data available through Google Analytics. These changes involve adjustments in the configuration of Google Analytics on the website pages as well as changes to the NSO websites and data portals themselves. Not all the recommendations will be relevant in every context, but those included here tend to be common issues across websites. In addition to tracking which recommendations may apply to which country participating in the study, Forum One provided an estimate of how frequently they have encountered these opportunities for improvement when working with other websites. Although these recommendations were developed through the analysis of the ten websites and data portals included in this study, they are widely applicable and can be used by any NSO seeking to improve their site.
The recommendations below have been organized according to the effort expected to accomplish them and further sorted by the impact the changes will have on the quality of data obtained. Those that require the least effort can be implemented immediately, while those that require high effort should probably be saved for consideration until a site redesign is undertaken. More information on how to implement many of these recommendations is available in the Annex: Instruction Package.
Table A summarizes and organizes the recommendations according to the effort that each will require.
Table A: Summary of recommendations
Low Effort | Moderate Effort | High Effort |
Consistently install Google Analytics on all pages | Track data file downloads | Avoid the use of iframes |
Filter bot traffic | Capture web traffic key to data sites | Ensure consistent use of language in URL structure |
Maintain an up-to-date list of properties and views | Implement canonical URL structures | Create human-readable URL structures |
Implement site search tracking | Create a single “roll-up” Google Analytics view | Create a clear directory structure |
Filtering out internal traffic | Enable cross-domain tracking | |
Label each website page with a unique and clear title | ||
Remove spaces in filenames or URL structures |
Effort required: Low
Consistently install Google Analytics on all pages
Analytics tracking codes must be installed across every page within a website. This is not a common issue, but when tracking codes are missing, it has a high impact on the quality of the data that Google Analytics collects. If the tracking code is missing across a single page or across a section of content, page views per session, entrance pages, bounce rate, and referral sources cannot be accurately recorded. One of the NSO websites participating in this study did not have Google Analytics installed on the home page or on a number of other key landing pages throughout the site. This is an extremely urgent issue that needs to be resolved.
Filter bot traffic
To gain the most accurate data within Google Analytics, known bot traffic must be filtered. This allows Google Analytics to collect the real traffic that comes from human users rather than tracking the activity of bots. This is also a very simple issue to fix. Under the management user interface, it is possible to simply check a box labeled “Exclude traffic from known bots and spiders.” If this option is selected, then Google Analytics will filter out the activity of all known bots and spiders.
Maintain an up-to-date list of properties and views
Google Analytics properties and views must be clearly labeled and those no longer in use should be deleted. If it is not possible to delete them, then titles should be updated to reflect the fact that they have been retired. This is a common issue that makes it challenging to identify the correct property and view to use when drawing conclusions about user behavior. Unless the properties and views have clear titles, outdated or incorrect ones may be included in the analysis.
Implement site search tracking
Most websites allow users to search for data using an internal search engine, and each website should track the web traffic related to these searches. Not only is it possible to view user activity leading up to and following the use of the search engine, site search tracking also allows analysis of the search terms used. This may reveal content that users are not readily able to locate or identify gaps within a site’s content. In most cases, resolving this issue is a simple matter of enabling site search tracking. However, in certain circumstances, where search parameters are not included within the URL structure, the level of effort to implement site search can be high, as it may involve custom coding.
Filtering out internal traffic
An IP address filter should be used to keep from tracking internal traffic. This will prevent the Google Analytics data from being skewed by the activity of internal users updating and managing the site. Websites that receive lower web traffic will see a greater change to their analytic reporting than others., but it will ensure the data being reported is relevant and actionable.
Effort required: Moderate
Track data file downloads
It is necessary to track file downloads to monitor users when they access and download data files. Although this may be a more complex recommendation to implement, it is crucial for monitoring data use through NSO websites and data portals. Otherwise it is only possible to record what pages were visited on a site, but there is no way to tell whether a user accessed the data a page offered before leaving the site. It is possible to use Google Analytics’ outbound file download tracking events to capture when a file download has occurred.
Capture web traffic to key data sites
It is important to capture how often users are traveling from one site to the other when data or key assets are hosted within other sites. To obtain a more complete understanding of usage, it is possible to use Google Analytics’ outbound link tracking events to capture when a file download has occurred. Unless this is implemented, it will not be possible to record when a user leaves an NSO site to access data contained on another data portal.
Implement canonical URL structures
A website that contains a single page that is accessible through multiple URLs or different pages with similar content must have one of the URLs designated as canonical. In addition to impacting the analytics data for a site, having multiple URLs for the same page can dilute search rankings and prevent users from locating relevant content. A canonical tag lets search engines know which page should be indexed and which page can be ignored.
Create a single “roll up” Google Analytics view
If content is provided across multiple domains, at least one property and view should be created within Google Analytics where all domains feed into one set of data. This will provide a holistic view of how users are accessing content across the various data portals. This is particularly important for NSO websites that provide access to data through dedicated data portals. When creating this “roll-up” view across multiple domains, it is important to implement cross domain tracking to ensure data is accurately collected.
Enable cross-domain tracking
In cases where content is provided across multiple domains, cross-domain tracking should be enabled to gain a better understanding on where users came from, their path to the data, and how long they spent on the site. Without cross-domain tracking, user session duration, pages per session, landing page and entrance source will not be accurately measured and reported through Google Analytics.
Label each website page with a unique and clear title
Each page of a website should have a title that is different from any other page and that clearly describes the content contained within it. Many websites use a default title on multiple pages across the site. Other websites may use simple titles such as “Table” or “Data” that don’t describe the content of the page. Unique and clear page titles serve two important purposes; first, it improves search engine optimization by allowing search engines to correctly index pages and second, it allows Google Analytics to correctly display data by page title. When pages have the same title, Google Analytics combines data for those pages. Without clear page titles, it is only possible to analyze data by URLs which are not always clear. Although relabeling website pages does not pose a high technical challenge, it may be a time-consuming process depending on the number of pages involved.
Remove spaces in filenames or URL structures
The filenames and URL structures should be a continuous string of characters and symbols. This is necessary to ensure that search engines can index URLS and to prevent them from inserting additional characters into the spaces. Dashes or hyphens should be used to separate words instead of spaces. Although correcting this issue is not technically difficult, it can be time consuming.
Effort required: High
Avoid the use of iframes
Where possible, iFrames should be avoided in favor of posting content directly within a page or using a downloadable document. Web designers use iFrames to change content without needing the user to reload the surrounding page. However, iFrames cannot be indexed by search engines and cannot be easily captured within analytics. They can also create accessibility issues. It is rare for a website to provide access to data through iFrames, but when this happens, it is impossible to track data file downloads.
Ensure consistent use of language in URL structure
When providing content within two or more languages, it is a best practice to append a variable to the page URL to quickly identify the user’s language preference and to calculate the number of pageview content received across multiple languages. The level of effort it will take to address the issue will be affected by the method used to build and manage the site.
Create human-readable URL structures
Instead of a complex series of ID characters and symbols, URLs should include recognizable and descriptive keywords. This will help ensure that users can find the content and data they are seeking. Human-readable URL structures facilitate ranking within search engine results. To ensure users can find the content and data they are seeking, ensure each URL includes recognizable and descriptive keywords. Dashes or hyphens should be used to separate words. The level of effort will depend on the method used to build and manage the site.
Create a clear directory structure
Specific issues or sets of data should be grouped and organized under a clear directory structure. This applies to human-readable URLs that include words descriptive of the content of a given page. Creating this structure will facilitate the analysis of web traffic. A directory structure can group statistics by category and type. Thus, a dataset under /statistics/ could be further grouped under subheadings like /health/ or /education/. Example: https://www.example.net/statistics/health/2017/dataset-name Having such a directory structure will make it possible to analyze web traffic related to specific categories and subsets of data.
Annex 2: Web Traffic Dashboard
Each country participating in this study has received access to a dashboard presenting a selection of web traffic data for their data portal available through their Google Analytics accounts. A template for this dashboard is available for anyone to access and use to create their own dashboard. Like the country dashboards, the template was built using Google Data Studio[7]. The instructions given below for setting up the dashboard template may also be of help to website managers who wish to further customize an existing dashboard.
Because an enormous amount of data is available through Google Analytics, accessing web traffic data directly through Google Analytics can be a time consuming process, particularly given the need for selection and configuration every time the data need to be accessed. The dashboard template presents a selection of indicators that are relevant to monitoring user activity on a website or data portal. Using this dashboard is as simple as opening a document on Google Drive. (Any dashboard created by Google Data Studio will appear within Google Drive.) It is possible to further customize each dashboard to reflect the monitoring needs for a particular website.
Although the dashboard displays Google Analytics data, the data displayed through Data Studio may differ from data returned by Google Analytics due to sampling.[8] Sampling may happen more frequently and result in larger gaps when a site experiences hosts more than 100,000 sessions within a reporting period. Rather than provide pin-point accuracy, the goal of the dashboard is to uncover trends and provide tangible, actionable data on how users interact with the website that can be used to inform decisions about how to optimize web properties to provide easier access to the data users are seeking.
Accessing Dashboard Template
To use the template, it is necessary to have a Google-enabled email address. This is also necessary for accessing Google Analytics itself, so it is may be convenient to use the email address associated with the Google Analytics account to access the dashboard template.
The dashboard template presents sample Google Analytics Data as a placeholder. The contents of the dashboard will adjust according to the data source. A number of sections in the template are blank, which is due to the need for initial configuration of dashboard settings.
Step 1: Open the dashboard template
The link for accessing the dashboard template is: https://datastudio.google.com/open/1a4pVANVYrQVwiaPM_PTSHSjbJwUHkwIn
Step 2: Make a copy and connect to new Google Analytics data
The dashboard template is set as public so that anyone can view it. Initially it displays dummy data from Google. To connect it with data from a new Google Analytics account, make a copy by clicking the copy icon in the upper right-hand corner as highlighted in the screenshot below.
Clicking this icon opens a dialogue window that invites the user to connect the dashboard template to a new source of data. If the template is being accessed from an email account associated with a Google Analytics account, it will be possible to select the relevant account and view from the drop-down menu. Once the new data source is selected, select Create Report.
Step 3: Configure dashboard content for new data
The content of the dashboard will update automatically to display web traffic data from the new Google Analytics account. Please note that the Search Usage page (page 4) may be blank if search tracking is not enabled for the website or properly configured on Google Analytics. In certain circumstances where search parameters are not included within the URL structure, additional configuration of the search settings may be required. More information is available on this in the Instruction Package. Once search tracking has been enabled and properly configured, the Search Usage will automatically update.
Additional configuration of the dashboard is necessary for page three, Key Data Page Analysis. This is because it presents web traffic from selected website pages that provide access to official statistics, which will differ from site to site. Some countries may have a single landing page for accessing official statistics, while others may have a several that they wish to monitor. The first table on page 3, “Traffic for Data Landing Pages,” provides summary data for the key pages, while the following tables show the next table that web traffic moves to after viewing a particular landing page. The number of these “Next Page” tables should match the number of landing pages provided in the first table above.
Step 3.1: Updating Traffic for Data Landing Pages
Select EDIT in the header menu.
Select the table. This will change the content in the side panel to the right. Scroll down the Data column to the bottom to find the Filter menu. Select ADD A FILTER. A new menu of filters will appear. Select CREATE A FILTER at the bottom of the side panel.
In the dialog box that pops up, create a name for the new filter, possibly [Country] Data Pages. The following steps will allow key data pages to be selected. On the Select a field menu, type “Page” into the Search fields. Scroll down to find and select the option that only says “Page”. On the Select a condition menu, choose Equal to (=). In the field that says, “example: value field,” type the URL information for a given data page. Note if the full address of a data landing page is www.example.org/statistics-page/, it is only necessary to include /statistics-page/ in this field. The result should appear as in the screenshot below. To add additional pages, select AND to repeat the process for other pages.
Updating Next Page After Viewing tables
The template provides two default tables to display web traffic for pages viewed after viewing a data landing page. The title of each table can be updated by selecting the text and replacing the [Data Landing Page Title] with new text. To change the content of the table, select it, and on the side panel to the right, scroll down to find the Filter menu. Select ADD A FILTER and CREATE A FILTER.
In the dialogue box that pops up, create a name for the new filter that will make it easy for future users to identify it. On the Select a field menu, type “Previous Page Path” into the Search field and select this option from the list below. On the Select a condition menu, choose Contains. In the field that says, “example: value field,” type the URL information for the data page in question. As before, it is only necessary to include the sections of the URL following the main website address. The final result should appear as in the screenshot below.
Repeat this process for the other tables. To delete a table, select the table and press the backspace or delete keys on the keyboard. To create a table, make a copy by selecting the table and right clicking to access copy and paste options.
If there are too many tables and they become too large to fit on the dashboard page, it is possible to reduce the number of rows of data displayed on each table. Select a table and in the side panel to the right, access the Rows per Page menu. The default number of rows per page is 10, but it is possible to select fewer.
It is also possible to adjust the size of the table by selecting it and dragging the edges to be larger or smaller.
Step 4: (Optional) Share dashboard with others
The dashboard content may be shared with other users. To grant access to new users, open the dashboard and click the top right-hand icon of a person as seen in the screenshot below.
In the dialogue box that appears, enter the email address of the individual with whom the dashboard should be shared and select Done. The newly added person will receive instructions via email on how to access the dashboard.
Please note, if the default privacy setting is “Anyone with the link can view” as appears in the screenshot above, there is no limitation on how widely the dashboard can be shared. To increase the privacy and security of the data, select “can view” and choose “OFF – only specific people can access.”
Embedding the Dashboard
It is also possible to make the dashboard fully public through embedding it on the NSO site itself. This would allow others to understand how the websites are being used and their official statistics are being accessed. It is possible to share the dashboard as broadly as possible through iframes, as these provide a window to the dashboard hosted on Google Studio. However, as discussed in the recommendations, iframes will not make it possible to track how users interact with the data.
Instructions:
- Sign in to Data Studio.
- Edit the report to be embedded.
- Share the report:
- For a public report, use the link sharing options “Public on the web” or “Anyone with the link can view”
- For a private report, enter one or more users or Google Groups
- G Suite users: To limit the report to users in your domain, turn link sharing on and select the “Anyone at [domain] with the link can view”
- Select File > Embed report, or in the upper right, click Embed.
- Click Enable embedding. A dialog box appears: Enable embedding dialog
Note: To embed a specific page of your report, navigate to that page before generating the embed link.
- Ensure that the Embed Code option is selected. The iframe code appears in the text area below.
- (Optional) Adjust the size of the iframe using the width and height controls
- Click COPY TO CLIPBOARD. Note that the link generated by this dialog must be used. It isn’t possible to embed a report using the standard shareable link.
- Edit the HTML source of the page on which the report will be embedded. Paste the iframe code where the report should appear.
More information is available at: https://support.google.com/datastudio/answer/7450249?hl=en
Reviewing Dashboard Content
The dashboard contains four pages: Audience Overview, Content Analysis, Key Data Page Analysis, and Search Usage. Below is a brief review of the content of each of these pages.
Audience Overview
The Audience Overview page focuses on how many people are accessing the portal, where they are coming from, the method of finding the site, and how long they spend engaging with the site. All comparisons, unless otherwise noted, are made year over year.
Audience Summary
The audience summary provides the three primary methods of measuring the reach of the site. “Users” tracks individuals. “Sessions” tracks how many times those individuals came back to the site. “Page views” indicates the overall number of pages those individuals accessed during their session. It also provides the bounce rate (how often visit only one page during their session) which is an overall indicator of site health.
User Trend Chart
The user trend chart provides a full year summary of how many users the site received each month compared to the previous year. This chart can uncover cyclical trends and can provide insights into how quickly the site is gaining in popularity over time. Because data for the current month are incomplete, the chart may show a sharp drop in the final month that will be corrected when complete data are available.
Channel Pie Chart
The channel pie chart shows how users are finding the site. The majority of users will be using search engines, which are reflected in the label “organic search”.
User Engagement Table
User engagement measured by page depth and time on site is an excellent measure of site health. While it is not possible to tell if users found what they are looking for, it is possible to see if there is a proportionate average session duration related to how many pages a user visited. If there are many pages visited in a short amount of time, this can indicate users are lost and quickly bouncing from page to page. An average of 1 min 30 seconds or longer per page would be a quality ratio.
User Location Map
The user location map can be used to view the site’s popularity by selecting a continent and viewing the number of sessions within each country.
Content Analysis
The Content Analysis page focuses on page-level interactions including how many pages individuals are accessing while exploring the portal, the pages they enter the site through, the most popular pages visited, and the last pages they view before leaving.
Audience Summary
The audience summary summarizes page-level interactions, including the total number of pageviews, the average time on page, the average number of pages accessed by a user during a single session, and the overall bounce rate. It’s important to note that all users who bounced have viewed only one page before leaving the site, so their numbers skew the average number of pageviews per session downward.
Top Entrance Pages
The top entrance pages table indicate how users are primarily finding and entering the site and how long they stay within the site before leaving. Review the top pages to ensure they serve well as a starting point for users entering the site. This includes having clear navigation and links to related content and data sets.
Most Popular Pages
The most popular pages table lists the pages most frequently accessed by users and the average length of time spent within the page. Monitor this list to identify whether there are any “popular” pages that receive less than an average of one minute on page, because this may indicate that users are not finding what they hoped for and are leaving quickly.
Top Exit Pages
The exit pages table displays the pages users most frequently visit just before leaving the site. A high exit rate for a page is not necessarily bad: it may indicate that users found the information or resources they came to the site to retrieve.
Key Data Page Analysis
The Key Data Content Analysis page focuses on the site’s key data landing pages. Some countries may have a single landing page for accessing official statistics, while others may have a several that they wish to monitor. This page provides summary data on all landing pages as well as web traffic to “next pages” viewed after a given landing page. These tables are affected by the structure and organization of a given site. If the data landing pages are not included within a specific directory, or section, of the site, they cannot be easily pulled out for examination.
Traffic for Data Landing Pages
The traffic for the data landing pages table provides summary data for all key pages. It shows the number of page views each landing page has received, the average time users spent on the page, the bounce rate, and the percent of sessions that ended on that page.
Next Page After Viewing
The next page after viewing tables show web traffic to the other pages after viewing a landing page. It shows the number of page views each page receives as well as the average amount of time users spent on each page.
Search Usage
The search usage page uncovers the top data-related searches conducted within the site and the pages users then went to. Review these results to see if users are landing on the best results that would correspond with their search. If it appears that there is other content that could be a better fit, review the page content to ensure it is properly labeled and contains keywords. It also presents the top data related searches that generated no results.
Search Overview
The search overview metrics provide information on user behavior in relation to the searches performed on the website. It provides the total sessions with search, the average number of times visitors viewed a search result page after performing a search, the average number of pages visitors viewed after performing a search, the average time spent on the website after search, and the percent of sessions that ended following a result from an internal search
Search Terms
The search terms table shows the terms that users entered into the search engine in order to find content on the website that they were looking for. This table also shows the top page that each term led users to and the number of times users entered in each key term.
Annex 3: Customize Dashboard Content
The dashboard template is provided as a starting place for countries to analyze the web traffic data most relevant to monitoring the access and use of an NSO website or data portal. It is possible to completely change the design and content of the dashboard according to the unique monitoring needs of each website.[9]
The sections below provide instructions from Google Data Studio support pages.
Change layout of the report
It is possible to control the way the dashboard appears on the viewer’s screen using the options in the Layout tab of the Layout and Theme properties panel on the right-hand side of the screen. This is the default properties panel; it appears when no other component is selected.
View mode options
Header visibility
The header visibility options control the behavior of the report header in view mode. The header contains things like the report title, the share button, and edit button.
- Always show—the report header is always visible.
- Auto hide—the report header appears briefly, then is hidden. Hover your mouse over the header area to redisplay it.
- Initially hidden—the report header is hidden until the mouse hovers over the header area.
Navigation position
The navigation position options control how the pagination controls appear in your report.
- Left displays the report page navigation in a collapsible panel on the left.
- Top displays the report page navigation above the report.
Display mode
The display mode options govern how your report fits in the browser window.
- Fit to width scales the components in the report in proportion to the width of the window.
- Actual size displays the report components at the same size they were created.
- Has margin shows or hides the margin area surrounding the report. Hiding the margin makes the report appear to occupy the entire window.
Canvas Size
The canvas size options let a user select from preset sizes or enter custom display dimensions.
Report-level component position
This option determines how report-level components interact with other components on the page.
- Top positions report-level components in front of all other components (similar to using the Arrange > Order > Bring to front menu).
- Bottom positions report-level components behind all other components (similar to using the Arrange > Order > Send to back menu).
More information on how to use the report editor is available at: https://support.google.com/datastudio/answer/6371822?visit_id=636743650895496899-4004008079&rd=2
Add a new chart or graph
(Source: https://support.google.com/datastudio/answer/6291062)
The existing dashboards are just a starting place, add your own table, pie chart, trend chart, bar chart, bubble charts, and pivot tables to your dashboards. It is a simple process to create visually attractive charts in Data Studio. To do this, click the chart type to be added on the toolbar and draw it on the page. Customize the chart’s data in the DATA properties panel. Use the STYLE panel options to adjust design elements.
Add a chart to a report
Use the toolbar at the top of the editor to add charts, as well as text boxes, controls, shapes, and images to your report. It is also possible to select the desired component from the Insert menu.
After selecting the chart on the toolbar, click and draw on the editor page where the chart should appear.
Resize the chart by clicking and dragging a corner or edge. For some charts, such as the scorecard and pie chart, changing the chart size increases or decreases the font size used for metrics and labels.
It is possible to move the chart using a mouse or keyboard arrows. When using the keyboard, fine-tune the placement by holding down the Shift key while pressing an arrow key (this moves the selected component in single pixel increments).
When 2 or more components are selected, use the Arrange menu to align them horizontally or vertically. It is possible to also group selected components, change their visual order, and make them appear on every page.
More information on how to arrange and group components on a page is available at: https://support.google.com/datastudio/answer/6370253
Configure chart data
Charts get their data from a data source. The fields in a data source come in 2 forms: dimensions and metrics. Data Studio automatically picks dimensions and metrics when a chart is first drawn, but it is possible to easily change these:
To change a chart’s data:
- Select the chart
- Select the DATA tab on the right
- Use the properties panel to select new dimensions (in green) or metrics (in blue).
Some charts allow multiple dimensions and metrics to be added. Click +Add a dimension or +Add a metric (in gray) under the existing ones.
More information on dimensions and metrics is available at: https://support.google.com/datastudio/answer/6402048
Switch chart type
It is possible to switch between chart types to see how the data look using different visualization techniques. Data Studio adjusts the default dimensions and metrics to best suit the selected chart type. Any customizations you’ve made to the chart, including adding or changing dimensions and metrics, style options, filters, segments, etc., are preserved so it is possible to switch back to the originally selected chart.
To switch chart types:
- Select the chart
- Select the DATA tab on the right
- Click the desired chart in the Chart type section at the top of the properties panel.
Select a different data source for a chart
Every chart added will be based on the current default data source. It is possible to select a different data source using the Data Source options in the DATA tab. Charts can only visualize data from a single data source, but it is possible to have as many different data sources in a report as the creator has access to.
To change the data source used by a chart:
- Select the chart
- Select the DATA tab on the right
- Click the current data source
- Select an existing data source or click CREATE NEW DATA SOURCE at the bottom of the list.
- If prompted, add the data source to the report.
Changing the data source for one chart has no effect on the other charts in your report. If the new data source has a different structure (schema) from the original one, the chart may display errors. It is possible to fix those by selecting dimensions and metrics from the new data source.
More information about connecting to data is available at: https://support.google.com/datastudio/answer/6390659
Change chart date properties
The chart date options are located below the dimensions and metrics in the DATA tab. These options let the time frame of the chart be controlled. It is also possible to tell the chart whether or not to display previous period performance.
More information on working with dates and time is available at https://support.google.com/datastudio/answer/6401549
Style a chart
The STYLE tab options provide a great deal of control over the appearance of charts. Chart style options include shared properties, such as font styles, background and border colors. Individual charts will also have properties specific that chart, such as whether to show a time series as a line or bars, or how wide to make the donut option of a pie chart.
It is possible to style multiple charts at once by selecting them, then applying any available styles to the selection. Only shared style properties can be set this way.
It is possible to copy styling from one component to another component:
- Copy the component that has the styling that should be applied.
- Right click on the component to which that style should be applied.
- Select Paste Special > Paste style only.
Add a filter control to data
View just a subset of results within a dashboard and easily compare mobile vs. desktop users or view only content that includes a specific keyword within the URL by adding a new filter control to the dashboard. Filter controls allow report users to apply and remove filters on-demand.[10]
It is possible to add filters to an entire report, page, chart, filter control, or to a group of charts and controls. To add a filter, the following steps can be followed:
- Add a new filter to a chart or filter control
- Edit your report.
- Select the chart or control to filter.
- Select the DATA tab in the Properties panel.
- Click +Add a filter.
- Click CREATE NEW FILTER. (It is also possible to reuse an existing filter)
- Name the filter.
- Select Include or Exclude. Include filters include only data that matches the expression provided. Exclude filters remove all data that matches the expression.
- Select the dimension or metric by which to filter.
- Select the comparison operator (e.g. Equals, Contains, Greater than, etc.).
- Provide a comparison value for the expression.
- (Optional) To add an OR clause, click OR on the right of the condition.
- (Optional) To add an AND clause, click AND below the clause.
- Click SAVE.
More information on filter conditions is available at: https://support.google.com/datastudio/answer/7326859?hl=en
Add new data source
It is possible to consolidate results from multiple accounts associated with a website by adding another data source to the dashboard. Data from a range of other tools, including spreadsheets, can also be added. Below is a tutorial from Google Data Studio on how to create a data source that connects to a Google Analytics view.
Step 1: Connect to your Google Analytics account
The first step in creating a data source is to connect to your data set.
-
- Sign in to Data Studio. Access Google Data Studio at this link: https://datastudio.google.com/
- Navigate to the DATA SOURCES Available here: https://datastudio.google.com/#/navigation/datasources
- Click +.
- In the connectors panel, select Google Analytics
.
- Select an Account,Property, and View
- Click CONNECTin the upper right. The fields panel
Step 2: Configure the data source
The fields panel contains all the dimensions (the green chips) and metrics (the blue chips) from the data set. The data source can be fine-tuned by renaming or disabling fields, adding calculated fields, and changing the aggregation and data type. Note: To create a basic report using Google Analytics data, it usually isn’t necessary to make any changes to the data source.
Data source credentials
Credentials determine who can see the data provided by this data source. The default setting is Owner’s Credentials, which allows anyone using this data source to see the data as if they were the owner of the data source. This means viewers of a report that uses this data source can see the data without needing their own access to the data set.
It is possible to instead require each user of the data source and any reports built on it to provide their own credentials to the data set. To do this:
- In the upper right of the fields panel, click Using Owner’s Credentials
- In the Data source access dialog, click Viewer’s Credentials
- Click SAVE.
More information on working with data source fields is available at: https://support.google.com/datastudio/topic/7441655
Step 3: Name the data source
Data Studio automatically names your data source the same as your data set name. To change that, click the name in the upper left and enter a new name.
It is also possible to rename the data source later from the DATA SOURCES home page by clicking the context menu and selecting Rename.
Step 4: Share the data source
It is possible to let other editors add this data source to reports by sharing it with them.
To share a data source
- In the upper right, click Share icon
- Enter the email addresses or Google Groups to be shared with
- For each person or group, select the access (permissions). Permissions determine what other people can do with the data source. Your choices are:
- Can view. People with this permission can view but not edit the data source.
- Can edit. People with this permission can both view and edit the data source.
Step 5: Use the data source in reports
It is now possible to create reports that get their data from the Google Analytics view:
- Click CREATE REPORT in the upper right
- Click ADD TO REPORT in the You are about to add a data source to this report
Source: https://support.google.com/datastudio/answer/6295036?hl=en
Annex 4: Instruction Package
This is a collection of guidance notes for implementing the recommendations made in the Measuring Data Use report. Each section contains instructions from Google Analytics help files. It is provided to help NSO managers, IT staff, and consultants working on the maintenance and improvements of data portals to implement any recommendations that have been identified as helpful to a specific context.
Installing Google Analytics
To start collecting basic data from a website:
-
Create or sign in to an Analytics account.
- Go to https://google.com/analytics
- Do one of the following:
- To create an account, click Start for free.
- To sign in to your account, Click Sign in to Analytics.
-
Set up a property in your Analytics account.
A property represents a website or app, and is the collection point in Analytics for the data from a site or app.
- Sign in to the Analytics account at https://analytics.google.com
- Click Admin. The Admin page provides access to the Analytics administrative features.
- In the ACCOUNT column, use the menu to select the account to which the property will be added.
- In the PROPERTY column, select Create new property from the menu.
- Note: Without edit permission on the account, the Create new property option won’t be visible. Check that the correct account in the ACCOUNT column has been selected.
- Select Website.
- Enter the Website name.
- Enter the Website URL.
- Note: It isn’t possible to create a property if the URL isn’t formatted correctly.
- Select an industry category
- Select the reporting time zone. This will be used as the day boundary for reports, regardless of where the data originates.
- Click Get Tracking ID. The property is created after this button is clicked, but the tracking code must be set up to collect data. The tracking ID will be used in the gtag.js tracking code snippet.
- Set up a reporting view in your property. Views allows the creation of filtered perspectives of your data; for example, all data except from your company’s internal IP addresses, or all data associated with a specific sales region.
- Sign in to the Analytics account at https://analytics.google.com
- Under Admin, navigate to the account and property to which a view will be added.
- In the VIEW column, click the menu, then click Create new view.
- Select Web Site
- Enter a Name.
- Note: Use a specific and descriptive name, to make it easy to tell what data is in this view when the name is seen in a list.
- Select the Reporting Time Zone.
- Note: If an Analytics account is linked to a Google Ads account, the time zone is automatically set to the Google Ads preference, and this option won’t be visible.
- (For User ID enabled Properties only) Click the toggle ON to create a User ID view. For a reporting view, leave the toggle set to OFF.
- Click Create View.
- Add the tracking code to a website to collect data in an Analytics property.
- Sign in to the Analytics account at https://analytics.google.com
- Find the tracking ID (generated during step 2).
- Click Admin.
- Select an account from the menu in the ACCOUNT column.
- Select a property from the menu in the PROPERTY column
- Under PROPERTY, click Tracking Info > Tracking Code. The tracking ID is displayed at the top of the page.
- Paste the following snippet right after the <head> tag on each page of your site. Replace GA_TRACKING_ID with your own Google Analytics tracking ID:
<!– Global Site Tag (gtag.js) – Google Analytics –>
<script async src=”https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID”></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());gtag(‘config’, ‘GA_TRACKING_ID’);
</script> - Verify that the tracking code is working.
- Visit the website and check to see that this visit is being registered in the Real-Time reports.
Sources:
https://support.google.com/analytics/answer/1008015
https://support.google.com/analytics/answer/1042508
https://support.google.com/analytics/answer/1009714
https://support.google.com/analytics/answer/1008080
Filtering bot traffic
- Sign in to the Analytics account at https://analytics.google.com
- Click Admin.
- Select View Settings on the view column
- Under Bot Filtering, click the box to exclude all hits from known bots and spiders.
Updating Google Analytics properties and views
- Sign in to the Analytics account at https://analytics.google.com
- Click Admin.
- Navigate to the property to be edited
- In the PROPERTY column, click Property settings.
- Edit the Property name.
- Click Save.
Source:
https://support.google.com/analytics/answer/3467852?hl=en
Implementing site search tracking
- Sign in to the Analytics account at https://analytics.google.com
- Click Admin.
- Select View Settings on the view column
- Under Site Search Settings, set Site Search Tracking to ON.
In some cases, this may be sufficient to implement site search, but further configuration may be required. In the Query Parameter field, enter the word or words that designate internal query parameters, such as term, search, query, keywords. Sometimes query parameters are designated by just a letter, such as s or q. Enter up to five parameters, separated by commas. Do not enter any additional characters: for example, if the query parameter is designated by the letter q, enter only q (not q=). Read
How to identify search query parameters:
When users search a site, their queries are usually included in the URL. For example, if Google is used to search the phrase Mountain View, the URL contains q (Google’s query parameter) followed by the query:
http://www.google.com?hl=en&q=mountain+view…
If the site uses categories, then the same principle applies. The webmaster may also be able to identify the query parameter for the site.
If the site uses a POST-based search engine, the search-results URL would look something like:
http://www.example.com/search_results.php
There are two options to use Site Search for POST-based search engines:
- Option 1: Configure your web application to append the query keywords to the end of the URL (e.g., http://www.example.com/search_results.php?q=keyword) and then set up Site Search as described in the previous section.
- Option 2: Customize the tracking code on your results page to dynamically specify a virtual page path that includes the query keywords. The tracking code on the results page would look something like:
analytics.js: ga(‘send’, ‘pageview’, ‘/search_results.php?q=keyword’);
Source:
https://support.google.com/analytics/answer/1012264?hl=en
Filtering internal traffic
To prevent internal traffic from affecting the web traffic data, a filter can be used to filter out traffic by IP address.
- Sign in to Google Analytics.
- Click Admin
- Navigate to the view in which the filter will be created.
- In the VIEW column, click Filters.
- Click + New Filter. (If this button is not visible, the necessary permission has not been granted.)
- Select Create new Filter.
- Enter a name for the filter.
- Leave the Filter Type as Predefined.
- Click the Select filter type drop-down menu and select Exclude.
- Click the Select source or destination drop-down menu and select traffic from the IP addresses.
- Click the Select expression drop-down menu and select the appropriate expression.
- Enter the IP address or a regular expression. See the examples below.
- From the Available views list, select the views to which the filter will be applied, then click Add.
- Click Save.
Example of excluding a single IP address:
- Filter name: enter a name
- Filter type: Predefined
- Select filter type: Exclude
- Select source or destination: traffic from the IP addresses
- Select expression: that are equal to
- IP address: enter a single IP address
Ensuring the filter works:
It is possible to use the Google Tag Assistant Chrome browser extension to record a flow on the website that sends hits to the property. The extension has an Analytics report that shows the effects of any filters set for a given view.
Sources:
https://support.google.com/analytics/answer/1034840?hl=en
https://support.google.com/analytics/answer/1034823?hl=en
Tracking data file downloads
Clicks on links to downloadable files (e.g. PDF, DOCX, etc.) can be tracked as events though other methods are possible.
To track clicks as events:
- Add a Google Analytics pageview tag if one does not already exist. This tag must fire on all pages.
- Enable Tag Manager to capture clicked URL values:
- Click Variables.
- In the Built-In Variables section, click Configure.
- Select the Click URL built-in variable.
- Create a single trigger to handle link clicks for each item in the table above:
- Click Triggers and then New.
- Click Trigger Configuration and then Click – Just Links
- Configure the trigger with these settings:
- Wait for tags: Enable
- Max wait time: 2000ms
- Check Validation: Disable
- Enable this trigger when all of these conditions are true: Click URL and then matches RegEx and then contact\.html|buy\.html|about\.html
- Fire On: All Clicks
- Name the trigger “Trigger – Nav Clicks” and save.
- Create a single Tag to handle all clicks:
- Click Tags and then New.
- Click Tag Configuration and then Universal Analytics.
- Set Track Type to Event.
- Complete the Event Tracking Parameters:
- Category: Nav
- Action: Select
- Label: {{Click URL}}
- Click Triggering and select the trigger created in step 3, titled “Trigger – Nav Clicks”.
- Save the tag.
- Publish the container.
If Analytics tracking is added directly to the site, event tracking will need to be implemented with analytics.js. Developer instructions for this form of tracking are available at: https://developers.google.com/analytics/devguides/collection/analyticsjs/events
Sources:
https://support.google.com/analytics/answer/1012044?hl=en
https://support.google.com/tagmanager/answer/6106716?visit_id=636747063213409290-2725201082&rd=1
Capturing web traffic to key data sites
It is possible to use the Google Tag manager to manage Analytics tracking or to add tracking directly to a site.
If Google Tag manager is used, follow the instructions below to implement events:
- Add a Google Analytics pageview tag if one does not already exist. This tag must fire on all pages.
- Enable Tag Manager to capture clicked URL values:
- Click Variables.
- In the Built-In Variables section, click Configure.
- Select the Click URL built-in variable.
- Create a single trigger to handle link clicks for each item in the table above:
- Click Triggers and then New.
- Click Trigger Configuration and then Click – Just Links
- Configure the trigger with these settings:
- Wait for tags: Enable
- Max wait time: 2000ms
- Check Validation: Disable
- Enable this trigger when all of these conditions are true: Click URL and then matches RegEx and then contact\.html|buy\.html|about\.html
- Fire On: All Clicks
- Name the trigger “Trigger – Nav Clicks” and save.
- Create a single Tag to handle all clicks:
- Click Tags and then New.
- Click Tag Configuration and then Universal Analytics.
- Set Track Type to Event.
- Complete the Event Tracking Parameters:
- Category: Nav
- Action: Select
- Label: {{Click URL}}
- Click Triggering and select the trigger created in step 3, titled “Trigger – Nav Clicks”.
- Save the tag.
- Publish the container.
If analytics tracking code is added directly to the site, the script below can be copied and pasted into the pages to set up Event tracking for outbound links. This script should be added to the page header, but not within the basic Analytics tracking code snippet. Outbound clicks will appear in the Analytics Events reports with a Category of “outbound” and an Action of “click”.
This example assumes that the website uses the analytics.js tracking code.
<script>
/**
* Function that tracks a click on an outbound link in Analytics.
* This function takes a valid URL string as an argument,and uses that URL string
* as the event label. Setting the transport method to ‘beacon’ lets the hit be sent
* using ‘navigator.sendBeacon’ in browser that support it.
*/
var trackOutboundLink = function(url) {
ga(‘send’, ‘event’, ‘outbound‘, ‘click‘, url, {
‘transport’: ‘beacon’,
‘hitCallback’: function(){document.location = url;}
});
}
</script>
It will also be necessary to add (or modify) the onclick attribute to the links. Use this example as a model for links:
<a href=”http://www.example.com” onclick=”trackOutboundLink(‘http://www.example.com’); return false;”>Check out example.com</a>
Sources:
https://support.google.com/analytics/answer/1136920?hl=en
https://support.google.com/tagmanager/answer/6106716?visit_id=636747063213409290-2725201082&rd=1
Implementing canonical URL structures
For all canonicalization methods, follow these general guidelines.
- Don’t use the robots.txt file for canonicalization purposes.
- Don’t use the URL removal tool for canonicalization: it removes all versions of a URL from search.
- Don’t specify different URLs as canonical for the same page using the same or different canonicalization techniques (for example, don’t specify one URL in a sitemap but a different URL for that same page using rel=”canonical”).
- Don’t use noindex as a means to prevent selection of a canonical page. This directive is intended to exclude the page from the index, not to manage the choice of a canonical page.
- Do specify a canonical page when using hreflang tags. Specify a canonical page in same language, or the best possible substitute language if a canonical doesn’t exist for the same language.
Prefer HTTPS over HTTP for canonical URLs
Google prefers HTTPS pages over equivalent HTTP pages as canonical, except when there are issues or conflicting signals such as the following:
- The HTTPS page has an invalid SSL certificate.
- The HTTPS page contains insecure dependencies (other than images).
- The HTTPS page redirects users to or through an HTTP page.
- The HTTPS page has a rel=”canonical” link to the HTTP page.
Although Google Analytics systems prefer HTTPS pages over HTTP pages by default, this behavior can be ensured by taking any of the following actions:
- Add redirects from the HTTP page to the HTTPS page.
- Add a rel=”canonical” link from the HTTP page to the HTTPS page.
- Implement HSTS.
To prevent Google from incorrectly making the HTTP page canonical, the following practices should be avoided:
- Bad SSL certificates and HTTPS-to-HTTP redirects cause us to prefer HTTP very strongly. Implementing HSTS cannot override this strong preference.
- Including the HTTP page in your sitemap or hreflang entries rather than the HTTPS version.
- Implementing your SSL/TLS certificate for the wrong host-variant: for example, example.com serving the certificate for www.example.com. The certificate must match your complete site URL, or be a wildcard certificate that can be used for multiple subdomains on a domain.
Tell Google to ignore dynamic parameters
Use Parameter Handling to tell Googlebot about any parameters that should be ignored when crawling. Ignoring certain parameters can reduce duplicate content in Google’s index and make your site more crawlable. For example, the parameter sessionID should be ignored is selected, Googlebot will consider the following two URLs as duplicates:
- https://www.example.com/dresses/green.php?sessionid=273749
- https://www.example.com/dresses/green.php
Several specific methods exist for specifying a canonical URL for duplicate URLS or duplicate/similar pages:
- Set a preferred domain: Use Search Console to specify URLs on one domain as canonical over their counterparts on another domain. For example, example.com rather than www.example.com. Use this only when there are two similar sites that differ only by subdomain. Don’t use this for http/https counterpart sites.
- Use rel=”canonical” link tag: Add a <link> tag in the code for all duplicate pages, pointing to the canonical page.
- Use rel=”canonical” HTTP header: Send a rel=canonical header in the page response.
- Use a sitemap: Specify canonical pages in a sitemap.
- Use 301 redirects for retired URLs: Use 301 redirects to tell Googlebot that a redirected URL is a better version than a given URL. Use this only when deprecating a duplicate page.
Source:
https://support.google.com/webmasters/answer/139066?hl=en
Enabling cross-domain tracking
If the flow of website user experience moves between more than one domain (e.g. example-products.com to example-checkout.com), Universal Analytics tags should be set up to track those visits as one. Without this functionality, Google Analytics will track the user as two separate visitors, which will inflate then number of users appearing in reports. This will occur even if both domains use the same Tag Manager container and Analytics account.
To configure Universal Analytics tags in Tag Manager to track across multiple domains:
- In Tag Manager, open your Google Analytics Settings variable or Universal Analytics tag for editing.
- To find your Google Analytics Settings variable, click Variables and then click the appropriate variable in the list.
- To find your Universal Analytics tag, click Tags and then select the appropriate tag in the list.
- Navigate to More Settings and then Cross Domain Tracking.
- Note: The preferred method is to make changes to the Google Analytics Settings variable, so that changes are shared across multiple tags. In Universal Analytics tags, click Enable overriding settings in this tag to expose the More Settings option.
- In the Auto Link Domains field, enter a comma-separated list of domains.
- Save changes and publish the container.
Source:
https://support.google.com/tagmanager/answer/6164469?visit_id=636747063213409290-2725201082&rd=1
Footnotes (continued from the Measuring Data Use report)
–> Click footnote number to return to its location in the text.
[7] A general introduction video to Google Data Studio is available at: https://www.youtube.com/embed/6FTUpceqWnc
[8] More information on sampling is available at: https://support.google.com/analytics/answer/2637192?hl=en
[9] Source: https://support.google.com/datastudio/answer/7355651?hl=en&ref_topic=6369007
[10] Source: https://support.google.com/datastudio/answer/7326859?hl=en