The Qlik Google Analytics Connector uses several Google APIs to extract web visitor data, such as page views over time or top landing pages, from your Google Analytics-enabled websites and load that data into your Qlik Sense apps.
- Qlik Sense Business
- Qlik Sense Enterprise SaaS
- Qlik Sense Enterprise on Windows
- Qlik Sense Desktop
Ways to access your data
To access your Google Analytics data, you will need to authenticate the connector with your Google account credentials. After you create a connection and select Google Analytics as your data source, you will be redirected to a Google login page to retrieve your authentication token.
Loading data from tables
After you authenticate the connector with your account credentials, use the tables to fetch your data. Some tables are preconfigured to access a specific set of data while others let you create custom queries. The table below outlines some of the use cases for some of the tables that are available.
Some tables are only available in the Data load editor, and are not available in the Add data interface. They are indicated below by the DLE Only column.
|DataFromQueryURI||Data manager and Data load editor||
Use this table to fetch data using a Query URI. Use the Google Query Explorer to build and test your URI.
|DataFromQueryURIQueryInfo||Data load editor||Use this table to fetch information about the specified Query URI.|
|DataFromTemplateQuery||Data manager and Data load editor||
Use this table to fetch data from preconfigured templates, such as time on site or top landing pages.
|MCFData||Data load editor||
Use this table to fetch Google Analytics Multi-Channel Funnels report data, according to specified metrics.
|MCFDataQueryInfo||Data load editor||Use this table to fetch information about the specfied MCF Data table query.|
|RealTimeData||Data load editor||
Use this table to request real time data for a profile view. The request must include the ids parameter and at least one metrics parameter.
|MetaDataColumns||Data load editor||Use this table to fetch a list of supported dimensions and metrics, with additional information about each.|
|Accounts||Data load editor||Use this table to list all accounts that can be accessed by the authenticated user.|
|WebProperties||Data manager and Data load editor||Use this table to list web properties that can be accessed by the authenticated user.|
|WebProfiles||Data manager and Data load editor||Use this table to fetch the details about all of your connected accounts. Many other tables require web IDs or account IDs which are listed when you run this table.|
|CustomDimensions||Data load editor||Use this table to fetch custom dimensions that have been added to the account.|
|CustomMetrics||Data load editor||Use this table to fetch custom metrics that have been added to the account.|
|Segments||Data load editor||Use this table to fetch a list of advanced segments.|
|Goals||Data load editor||Use this table to fetch a list of goals that have been added to the account.|
|GoalsEventDetails||Data load editor||Use this table to fetch a list of details for goals with the EVENTS type.|
To select and load data from a table, enter the required table parameters and click Preview data. Required parameters are marked with an asterisk (*). The table fields are displayed under the Data preview tab. You can select fields individually by selecting the box beside each field name. Select Insert script after you have made your selection.
A simple way to get started with the Qlik Google Analytics Connector is to use a prebuilt report using the DataFromTemplateQuery table.
Do the following:
- Select the DataFromTemplateQuery table.
Select one of your available Profile IDs from the drop-down list.Information noteIf you don’t see any Profile IDs check that your Google account has access to some by logging into the Google Analytics website or contacting your website administrator.Select a Query from the drop-down menu and enter a date range using the format DD-MM-YYYY.
- Click Preview data.
- Click Insert script.
You can manually build a URI using the Query Explorer from Google Analytics Demos & Tools. This gives you full flexibility over the dimensions and metrics that are returned.
To use the Query Explorer, the website and the connector must be authenticated with the same Google account.
Do the following:
Open the Query Explorer and enter your query parameters.
Click on Run Query.Tip noteThe Query Explorer provides a detailed view of your dimensions and metrics based on your query parameters.
In the Qlik Google Analytics Connector, select the DataFromQueryURl table and paste the API Query URl from the Query Explorer into the Query URI field.
- Click Insert Script.
Using custom variables
If you have custom variables setup on your website and you want to use them for your data feed, then you need to replace the XX in ga:customVarValueXX or ga:customVarNameXX with the relevant index of the custom variable.
The dimensions field = ga:date,ga:customVarValue1.
Working with the Google API quota limits
The Google APIs impose a rate limit of 10,000 requests per profile per day.
Reference - Google Analytics developer documentation
You can refer to the Google Analytics developer documentation to learn more about the requirements and restriction imposed by the Google API.
You have exceeded the API limits that are imposed on the Qlik Web Connectors by the Google APIs.
To reduce the impact of reaching the API rate limits, develop your app with the following in mind:
- Extract only the data you need.
- Reload one Google Analytics-based application at a time.
- Ensure that loops in your script that make API calls will not result in infinite loops.
You are receiving unexpected data or conflicting data
Differences in data can be due to a misinterpretation of the dimensions and metrics or due to the sampling used by Google Analytics.
Request data over smaller periods, for example, instead of requesting data for a month at a time, request data over a day or a week at a time.
Check that you also get the same numbers in the Google Query Explorer. The connector gets the data from the same system, so there should not be any differences.
Use the following procedures to identify and reconcile the differences:
Run exactly the same metrics in the connectors as on the platform.
Use the connector or the Query Explorer, and not your application, to check values by recreating the metric and looking at the data tab in Qlik Web Connectors.
Try to match the manual report to the connector, so if the connector gives you three columns of data, that is, date, pages visited and average time, then get the same report manually and compare the values.
Match the time scales. If the connector gives you each day's data for a month, but the manual report just gives you one figure for the whole month then values like averages will be affected.
Try a smaller time scale or data set as this will make it easier to identify where data is missing, so check numbers on a day by day basis.
Check the ranges coming back in the connector. If you select a date range, check that all those dates are in the data, that is, the first or last days are not missing.
If the values in the connector can be matched to the manual reports, but there is still a problem in the application, then you need to review your script, data model, expressions and objects, to check what you get in QlikWeb Connectors is the same as that fed into your application.
You cannot authentication because everything is greyed out or disabled
The embedded browser is failing to refresh.
Press F5 to refresh the embedded browser, which should enable it.
You receive a time out error for your request
This may be due to the volume of the data you are requesting.
Split your request in your load script and check if this solves your time out issue.