Run a PowerShell script to install the Google Analytics module in the Content Manager. After installation, configure your Google Analytics site key and publish the changes.
Before you begin
To perform this import, you must be logged in as a user with administrator-level access to your SDL Tridion Content Manager.
Procedure
- Access your SDL Digital Experience Accelerator installation media.
- Open a PowerShell command prompt in Run as administrator mode.
- Navigate to the modules\GoogleAnalytics folder and run the following command:
.\cms-import.ps1 -importType IMPORTTYPE -cmsUrl "https://cms.example.com:81/"
where:
-importType |
-
module-and-permissions
-
Installs the Google Analytics module and sets rights and permissions for the default User Groups in the Content Manager (default setting).
-
module-only
-
Only installs the Google Analytics module.
-
permissions-only
-
Only sets rights and permissions for the default User Groups in the imported Content Manager.
|
-cmsUrl | Web address of the Content Manager Explorer. |
(optional)cmsUserName | The username used for the authentication. |
(optional)cmsUserPassword | The password for the provided username. |
(optional)cmsAuth | The authentication type; possible values are: Windows (default), and Basic. You can use the Basic authentication type, in case your Content Manager Server requires credentials other than Windows credentials. |
- Access the Content Manager Explorer Web site.
- Configure Google Analytics site key:
- In your 400 Example site Publication, navigate to /Building Blocks/Settings/GoogleAnalytics/Site Manager/
- Open the Component Google Analytics Configuration.
- Set the value of siteKey to your Google Analytics site key.
- Select Save and Close to commit your changes.
- Publish the changes:
- Navigate to the Home/_System/include/ Structure Group.
- Select the Page Footer.
- In the Home tab, select Publish.
- Publish the Page.
- Refresh the Web application settings:
- Go to the Home/_System Structure Group.
- Select the Publish Settings Page and click .
- Go to your Web application and enter the URL /admin/refresh refresh the cache and reload the settings in the Web application.