The Google Analytics Experiments module is used for integration between the Google Analytics Experiments Framework and Magnolia. Magnolia's personalization makes it possible to set-up multiple versions of the page (variants) which can be used to run an experiment, such as an A/B test. Experimental data is sent to Google Analytics to track the progress of the experiment and provide feedback on results.
Maven is the easiest way to install the modules. Add the following dependencies to your bundle:
The Google Analytics experiments framework allows you to track any change to your website. The performance of this change will be measured to see if it meets a certain goal. Setting up and managing experiments is handled through the Experiments app.
In order to use this module and run experiments you will need to have the following:
- Google Analytics account: The data for the test will be sent to this account for feedback and results of the experiments.
- Google Service account: A service account is a special Google account that belongs to your Magnolia webapp.
- Google Analytics Goals: Have a basic understanding of goals and how to create them in your account.
- Overview of Content Experiments: Have an overview of how to run an experiment.
Configure your account information at the module level. This is for the communication with Google Analytics through the API. There is a default account node which can be used as a copy base here:
The configuration properties for the accounts are provided by the class
The ID of the Google Analytics account. Found on the Admin screen under Account Settings.
The name of your services account. See Enabling the Analytics API.
The view ID used in your Google Analytics account. Found on the Admin screen under View Settings.
The email of the service account authorized to get the Google Analytics data.
Private key generated from the service account credentials. The file has to be generated in JSON format. Stored as a resource.
Tracking ID of the Google Analytics account. Found on the Admin screen under Tracking Info.
The fully qualified URI of the site. This property will be used to create the variations URLs in the experiment.
Typically experiments are initiated from the Pages app. After creation they can be managed through the GA Experiments app.
Creating a new experiment starts with selecting a page to run an experiment on.
From the Pages app select a page.
- Create the page variants. As many as are needed for the experiment.
In the actionbar, click Run Experiment.
It's also possible to create experiments from the GA Experiments app.
Define the experiment parameters.
Account: Google Analytics account to use. Configured under the accounts node of the ga-experiments module.
Test Name: Name of the test to identify it.
Page: The selected page for the experiment.
Variations: Add as many variations as are needed for the experiment.
Goals: Select the goal defined in the Google Analytics account.
Duration: How long the experiment will run. 3-90 days.
Upon creating an experiment, a marketing tag is also created to correspond to that experiment. The tag has to be published along with the experiment.
If you are using multiple google analytics accounts, you will need to have multiple google analytics tags inserted for each different experiment.
Starting and Stopping
Once you have created an experiment you can start and stop that experiment using the Start and Stop actions. The status of the experiment will be updated.
You can delete a test (no matter its status) in the Experiments app. Select the experiment you want to delete and click on the action Delete Experiment. This action will remove the tag associated in the Marketing Tags app. This won't unpublish the tag if it was previously published to a public instance. You need to unpublish it manually before deleting the experiment on the author.
- This module is at INCUBATOR level.
- This module is not meant for collecting large numbers of experiments over time. Experiments should be removed or archived when completed.
- The Experiments app provides a column for experiment status. If you have a lot of experiments this could cause a slow down in app performance.
- This module will not work will Magnolia UI 5.6.5 (bundle release 5.6.6). See GAEXP-1 - Getting issue details... STATUS .