ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Web-specific functions / Google Analytics functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
GglAnalyticsAddEvent (Function)
In french: GglAnalyticsAjouteEvénement
Adds an event in Google Analytics.
Note: On July 1, 2023, Google Analytics moved from Universal Analytics to Google Analytics 4. WEBDEV 28 supports both versions. The WLanguage functions have been adapted. By default, existing projects use Universal Analytics and new projects use Google Analytics 4. For more details, see WEBDEV and Google Analytics.
Example
GglAnalyticsAddEvent("Video", "play", "product trial", "pushchair")
Syntax
GglAnalyticsAddEvent(<Category> , <Action> [, <Caption> [, <Event number> [, <Options>]]])
<Category>: Character string
Name of the category. This parameter is used to group several events ("Video" for example).
<Action>: Character string
Name of the action linked to the event ("play", for example).
<Caption>: Optional character string
Additional caption used to simplify the filing of events ("Advertising" for example).
This parameter corresponds to an empty string by default.
<Event number>: Optional integer
Number associated with the event. This parameters corresponds to 0 by default.
<Options>: Optional variant
Additional options dependent on Google Analytics. For more details on the possible values, see the Google Analytics documentation at https://developers.google.com/analytics/devguides/collection/analyticsjs/events.
This parameter is set to Null by default.
Remarks
To use this function, you must have and save a Google Analytics identifier in the project. For more details, see WEBDEV and Google Analytics.
Component: WDJS.DLL
Minimum version required
  • Version 22
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help