Google Analytics offers an integration opportunity for hosting providers and website builder platforms to enable a rich set of analytics and tools to optimize and improve a customer's business.
Benefits of a Google Analytics Integration
Integrating with Google Analytics provides a number of benefits for you and your customers.
- Measure website usage and improve its performance through analytics data.
- Data showing efficacy of new features (for example, demonstrating how a new responsive mobile site leads to increased mobile traffic).
Hosting Provider Benefits:
- Rapidly deploy an analytics solution for your customers with minimal development and maintenance costs.
- Aggregate data on how your customers' websites are performing.
- Insights or recommendations on website improvement to be shared with your customers.
The recommended implementation below ensures a seamless experience for users and eliminates errors that are common with copy/paste approaches. This results in lower support cost than a home grown solution, as users can implement Google Analytics quickly and rely on external resources for Google Analytics education and support.
The recommended Google Analytics implementation for hosting providers is organized into four main components:
Google Analytics offers APIs that allow you to create a new Account, Property, or View on behalf of the user. Utilize these APIs to offer a simplified new user signup flow that the user can complete entirely on your site. The signup flow is key because it allows you to store authentication credentials that can be used to take advantage of integration opportunities.
Once the customer’s Google Analytics account has been created or selected, use the stored credentials obtained during the sign-up flow to configure their account using the Management API.
One of the most important configurations is the creation of conversion goals. This creates a measure of success that can be used to assess the efficacy of changes on the site.
If a particular page is associated with a conversion event (for example, a “/thank-you” URL), then you can configure a destination goal. Similarly, if you are using event tracking on behalf of your customers, you can set up an Event goal. If you do not have prior knowledge of any URLs or events being tracked on your customer's website, create a Pages per session goal.
Core Pageview Tracking
It is recommended to add the pageview tracking on your users’ websites directly. This allows you to change the tracking code on behalf of your user if needed in the future and ensures that there will not be user error when copying and pasting the tracking code.
In addition to standard pageview tracking, there are additional interactions that you may wish to measure on behalf of your users.
If you offer the option for users to create an Ecommerce store, follow the steps outlined for Ecommerce Platform Providers.
Google Analytics integrates with a number of other Google services.
Other integrations must be initiated by the user.
There are other customizations that can be applied on behalf of the user:
- Event Tracking for measuring user interactions that do not trigger a page load
- Custom Dimensions to pass in custom data, such as the logged-in state of a user
- Configure goal conversions on behalf of users
In order to provide insights for your customers within your product, Google Analytics offers SDKs and libraries that allow you to display and visualize data. Use the Embed API to easily create and embed dashboards within the admin section of your product, or the Core Reporting API for advanced use cases.
Internal Reporting and Analysis
In addition to providing your customers with data from Google Analytics, you may wish to consume data for your own purposes. For example, you can use this data to understand trends across customers, or report on aggregate statistics. Use the access tokens obtained during User Onboarding to extract data using Google Analytics APIs.