ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Web-specific functions / Google Analytics functions
  • Overview
  • How to include Google Analytics in your WEBDEV sites?
  • Overview
  • Registration on Google Analytics
  • Specify the Measurement ID in the WEBDEV project
  • The available additional "trackers"
  • Custom event
  • Interaction with social network
  • Custom timing
  • Programming errors
  • Page view
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
Google Analytics is a very popular tool for measuring site traffic.
Google Analytics is used to measure the number of views for each site page, the load time of each page, the navigation path, the load time of page resources (images), the rebound rate, the environment of Web user (device, geographical location, language, browser, ...), the source of navigation (home page, ad, ...), etc.
WEBDEV automatically includes in your sites the trackers required to collect statistics in Google Analytics: you will know everything about the activities of Web users on your sites!
If necessary, you have the ability to include additional trackers in your sites, to manage special cases:
  • dowloading a file,
  • using planes, ...
This documentation page presents:
Remark: The pages taken into account by Google Analytics are the referenceables pages, which means the static pages, the Active WEBDEV Pages and the PHP pages.
Warning
On July 1, 2023, Google Analytics switched from Universal Analytics to Google Analytics 4. From version 28 onwards, WEBDEV manages both versions. The WLanguage functions have been adapted. For existing projects, Universal Analytics is used by default. For new projects, Google Analytics 4 is used by default.
This help page describes the different steps you need to follow.
To edit your accounts and projects on Google Analytics, see https://support.google.com/analytics/answer/10759417?hl=en
How to include Google Analytics in your WEBDEV sites?

Overview

To link Google Analytics and your site, you must:
  1. Define an account in Google Analytics. This account must be linked to your site.
  2. Retrieve the Google Analytics tracking ID associated with your account.
  3. Specify the following in the WEBDEV project:
    • tracking ID.
    • mode used: Universal Analytics or Google Analytics 4.
  4. Deploy the WEBDEV project.

Registration on Google Analytics

To link Google Analytics and your site, an account must be define in Google Analytics. This account must be linked to your site.
To define an account linked to a site on Google Analytics:
  1. Go to the site: https://www.google.fr/intl/fr/analytics/. Connect yourself (with your Google account for example). Register if not already done.
  2. Configure Analytics in the Google Marketing Platform home page.
  3. Specify the characteristics of Google Analytics account:
  4. In "Property Settings", create a Google Analytics 4 property. Specify the name of the website. This parameter is mandatory and it is used to identify the site in the Google Analytics dashboard.
    Remark: As of July 1, 2023, it is no longer possible to create an Property Universal Analytics.
  5. Enter the organization details.
  6. Create the account.
  7. Configure a Data Stream from the dashboard. Indicate that the Data Stream is used for a website, and in the configuration page, enter the website URL. This configuration allows you to associate the website with Google Analytics.
  8. The web stream is created and you get a Measurement ID.

Specify the Measurement ID in the WEBDEV project

To specify the Measurement ID in the WEBDEV project:
  1. Open the project description window: on the "Project" tab, in the "Project" group, click "Description".
  2. In the "General" tab:
    • Copy the Measurement ID of your site:
    • Indicate whether your account uses Universal Analytics or Google Analytics 4.
You can deploy your site. The static, AWP and PHP pages will be automatically taken into account by Google Analytics.
The available additional "trackers"
In addition to the general navigation statistics automatically managed by WEBDEV, you have the ability to measure specific behaviors:
  • Custom event: click on Order button, pass through a control, etc.
  • Interaction with social network.
  • Custom timing: measure the time spent on a process.
  • Exception in programming: programming error.
  • Page view.

Custom event

Tracking a custom event allows you to measure the frequency of a specific user action: clicking on a button, downloading a file, clicking on an ad banner, playing a video, etc.
To enable this tracker, call GglAnalyticsAddEvent in the corresponding code.

Interaction with social network

This tracker is used to measure the number of clicks on a social network button in the page: Like, Tweet, etc
To enable this tracker, call GglAnalyticsAddSocialNetworkAction in the corresponding code.

Custom timing

This tracker allows you to get statistics on the time spent during processes or specific user actions: time elapsed to display a list of products, time spent to fill out a form, etc.
To enable this tracker, call GglAnalyticsAddTiming in the corresponding code.

Programming errors

This tracker is used to measure the number of unexpected errors in the Browser code of the site.
All you have to do is use the WLanguage "When Exception" command then call GglAnalyticsAddException when the exception is canceled.

Page view

This type of custom tracker is used to enhance the views on the complex pages: plans, etc.
To enable this tracker, call GglAnalyticsAddPage.
Minimum version required
  • Version 22
Comments
Click [Add] to post a comment

Last update: 09/13/2023

Send a report | Local help