Create flexible Looker Studio reports which display data from your Xperience website. For example, these reports can show information about contacts and their activities, email marketing statistics, and more. Please see our Terms of Service and Privacy Policy for more information about how your data is used.
Use the following process to set up the integration:
- Install the module into your Xperience administration project.
- Configure exactly which types of data will be available for Looker Studio and generate the report.
- To comply with personal data protection policies, set up consents and data anonymization.
- Create Looker Studio reports and add a data source using the Kentico Xperience connector.
- Kentico Xperience 13.0.0 or newer.
- The integration works via the Xperience administration project.
- The development model used for the live site does not affect the integration, and both ASP.NET Core and MVC 5 are supported.
- Your Xperience administration project must be publicly accessible (not running on an internal network).
- Your application must regularly process scheduled tasks.
- Download the Kentico.Xperience.Google.DataStudio ZIP package by locating the latest Release.
- In the Xperience administration, open the Sites application.
- Import the downloaded package.
- Make sure the Import files and Import code files settings are enabled.
- Perform the necessary steps to include the following imported folder in your project:
/CMSModules/Kentico.Xperience.Google.DataStudio
To reduce the number of database queries required to display your Xperience data, the Looker Studio integration generates a physical JSON file in the App_Data/CMSModules/Kentico.Xperience.Google.DataStudio directory. This file is generated by the scheduled task Generate Google Data Studio report, which is configured to run daily by default.
To begin using the Looker Studio connector immediately after installing the integration, go to the Scheduled tasks application and manually execute the task.
The generated report contains certain fields by default, which you can find in DefaultDataStudioFieldSetProvider.cs
. The report fields are defined by FieldSets
which represent a single object type (like contacts) and its fields which are represented by a list of FieldDefinitions
.
If you wish to modify the default list of fields, create a custom implementation of IDataStudioFieldSetProvider
. The class must be added under the CMS\Old_App_Code folder of your Xperience administration project.
Define the GetFieldSets
method. For example, if your reports only need to display contacts and activities, you can remove the other default FieldSets
:
[assembly: RegisterImplementation(typeof(IDataStudioFieldSetProvider), typeof(CustomFieldSetProvider), Lifestyle = Lifestyle.Singleton, Priority = RegistrationPriority.Default)]
namespace MySite.LookerStudio
{
/// <summary>
/// Custom implementation of <see cref="IDataStudioFieldSetProvider"/>.
/// </summary>
public class CustomFieldSetProvider : IDataStudioFieldSetProvider
{
public IEnumerable<FieldSet> GetFieldSets()
{
return new FieldSet[]
{
DataStudioConstants.activityFieldSet,
DataStudioConstants.contactFieldSet
};
}
You can also add/remove FieldDefinitions
from the default FieldSet.Fields
properties, or create your own custom FieldSets
. For example, to add products to the report you can create a new FieldSet
which contains the fields you are interested in displaying:
public IEnumerable<FieldSet> GetFieldSets()
{
return new FieldSet[]
{
DataStudioConstants.activityFieldSet,
// Other FieldSets...
new FieldSet {
ObjectType = SKUInfo.OBJECT_TYPE_SKU,
DateFilterField = nameof(SKUInfo.SKUCreated),
Fields = new FieldDefinition[]
{
new FieldDefinition {
Name = nameof(SKUInfo.SKUID),
DataType = DataStudioFieldType.TEXT,
Anonymize = true
},
new FieldDefinition {
Name = nameof(SKUInfo.SKUCreated),
DataType = DataStudioFieldType.YEAR_MONTH_DAY_SECOND
}
}
},
};
}
💡 When creating a new
FieldSet
, always include theDateFilterField
if supported by the object type, and include that field in theFields
list. This ensures that reports can display the correct data for the selected timeframe. This field is generally the object's "created on" date -SKUInfo.SKUCreated
for products in the example above.
Because the personal information of your visitors is transmitted to Google's servers, it is important to keep GDPR and other data protection regulations in mind while using this integration. By default, this integration protects your visitor's data using two approaches:
- Anonymizing (hashing) identifiers
- Checking consent agreements
If you are collecting data about your visitors on your website (e.g. via forms or activities), you should already have one or more consents active. We recommend creating another consent which notifies visitors that their data may be sent to Google for reporting purposes. This integration will automatically remove contacts and their activities from the report if they have not agreed to this consent.
To configure the consent requirements for the Looker Studio integration:
- Prepare a suitable consent in the Xperience Data protection application, and provide a way for visitors to give agreements.
- Open the Settings application.
- Navigate to Integration → Google Data Studio.
- Select your consent in the Required consent setting.
- The default value "(none)" means the integration will not check consent agreements and all contacts/activities will appear in the report.
- If you select a consent from the list, only the data of contacts who agreed to that consent will appear in the report.
- Click Save.
By default, the Looker Studio integration will anonymize the IDs of all data records, such as a contact's ID. When the report is generated, the IDs will be hashed using a salt that is discarded after the report is finished generating. This ensures that a record in the report cannot be correlated to any specific record in your database.
If you are creating your own FieldDefinitions
, we recommend setting Anonymize
to true for any field containing an ID:
new FieldDefinition {
Name = nameof(ContactInfo.ContactID),
DataType = DataStudioFieldType.TEXT,
Anonymize = true
}
If additional functionality is required to protect your visitor's data, it can be implemented by your developers. Aside from customizing the fields in the report, you can also implement your own anonymization method and limit the data in the report. Create a custom implementation of IDataStudioDataProtectionService
under the CMS\Old_App_Code folder of your Xperience administration project:
[assembly: RegisterImplementation(typeof(IDataStudioDataProtectionService), typeof(CustomDataProtectionService), Lifestyle = Lifestyle.Singleton, Priority = RegistrationPriority.Default)]
namespace MySite.LookerStudio
{
/// <summary>
/// Custom implementation of <see cref="IDataStudioDataProtectionService"/>.
/// </summary>
public class CustomDataProtectionService : IDataStudioDataProtectionService {
When creating a new Looker Studio report or adding a data source to an existing report, choose the Kentico Xperience connector.
Once you authorize the connector, you will be asked to provide the following:
- A Path which is the absolute URL of your Xperience administration website, e.g. https://myadmin.com.
- The username and password of an Xperience user to authenticate all Looker Studio requests. The permissions of this user are not checked. This requirement ensures that there are no unauthorized requests to access your report data.
⚠️ If the authentication parameters change (e.g. the user is deleted in Xperience), you must revoke access to the connector and re-authenticate. You can find more information about revoking access in the Data credentials article.
After you have properly authenticated, you can begin using the data source in report controls like tables. You can find more information about building reports in Google's documentation, such as the Table reference. One concept that we recommend you read carefully are Looker Studio's blends. If you are familiar with SQL, this is similar to performing a JOIN
on multiple tables and will help you retrieve the data you need in your reports.
For example, let's say you want to display a table listing the latest form submission activities on your site with the email address of the contact that submitted the form. To accomplish this, you can create a new blend with two tables: one containing the activity data, and one containing the contact data. In the Configure join menu, link the "ActivityContactID" field from one table to the "ContactID" field of the other table. In the activity table, add a filter to load only the activities where "ActivityType" equals "bizformsubmit," then add any other dimensions you'd like to display. Once finished, it could look something like this:
💡 The ContactEmail field is not available by default. If you want to follow the above example, you need to add the field to your report.
Please see CONTRIBUTING.md
for more information.
Distributed under the MIT License. See LICENSE.md
for more information.
See the Kentico home repository for more information about the products and general advice on submitting questions.