Set up the Analytics module

PREREQUISITES: Before you setup the Analytics module, you must have added and configured the Google Analytics widget on at least one page, and the module must have already collected some data. 

NOTE: When using the Google Analytics widget, the tracking code is always placed inside the <body> section of the page HTML. If you need to have the tracking code placed inside the <head> tag of the page HTML you must use a JavaScript widget and add the code manually. For more information see JavaScript widget | MVC.

When you open the Analytics module for the first time, you need to configure it to show data for the site you want.

To setup Analytics, perform the following:

  1. Login to Sitefinity CMS and click Marketing » Analytics.
    If you have not used the Analytics module before, the Configure Analytics link appears.
  2. Click Configure Analytics.
  3. Paste the Client ID and Client Secret that you have copied in Register the Analytics module » Step 18.

    NOTE: For specific Client ID and Client Secret, Sitefinity CMS stores only the latest generated refresh token. The reason is Google OAuth 2.0 limitation of 50 refresh tokens per user account. For more information, see Google official documentation about OAuth 2.0 expiration.

  4. Click Login to Google.
  5. Allow the created project to view and manage your Google Analytics data.
  6. In Available accounts, select the view that you have created to track this website.

    NOTE: If you have not set the tracking code, provided by Google Analytics on any page of your website or the page where you have set it has not been requested, Sitefinity CMS cannot find account and your domain in the list of Tracked domains.

  7. In Tracked domains, select the domain of your website.
    If you do not see the domain in the list, you can enter it manually.
  8. Click Save Settings.
    The Google Analytics tracking code appears.
  9. Click Save Settings.

RESULT: You can see website analytics data in the Analytics module.

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?