Google Analytics 4 Plugin

Dream it, build it!

Google Analytics 4 Plugin

Google Analytics 4

Google Analytics 4 plugin for Construct 3 allows you to track your game visits and events in the Google Analytics console. The plugin uses an external-dependency file that you should consider. The GA4 service requires the Google API located at https://www.googletagmanager.com/gtag/js, therefore the plugin always requires an internet connection to be able to work properly.

For a more detailed review on how the GA4 works, please visit the official documentation at https://developers.google.com/analytics/devguides/collection/ga4.

Properties


Property Description
Google Analytics 4 ID The GA4 Id setup in your google analytics console. Notice that this ID starts with a G-XXXXXX
Track Preview mode Allows the tracking of the preview mode while developing your game. Usefull for testing.
Initialization Type Manual/Auto initialization modes allow you to comply with your site privacy policy by turning off the tracking when the user consent wasn't given. Auto - Starts automatically the analytics engine and collects data immediatelly; Manual - requires Init action to be called to start collecting data.

Actions


Initialize

Initializes Google Analytics. If GA is already enabled, this action has no effect. Use only with the a Manual Initialization Type

Parameter Description
Enable Enable/Disabled the Google Analytics tracking

Add GA4 Property

Registers an additional GA4 property to your page. This allows you to add multiple tracking services.

Parameter Description
Property ID Property ID. Supported properties are: Google Analytics 4 (G-XXXXX), Google Ads (AW-XXXXX), etc. Check Google Analytics 4 documentation for third party compatibility information.
Configuration (Optional) Stringified JSON object containing the additional configuration. Check Google Analytics documentation for more information.

Send event

Sends an event to google analytics service

Parameter Description
Event Name Event Name to be sent to the GA4 engine.
Event Data (Optional) Stringified JSON data to be sent.

Send Event Async

Sends an event to google analytics service. Parameters are taken from the previous executions of the action Queue Event Params

Parameter Description
Event Name Event Name to be sent to the GA4 engine.

Queue Event Params

Queues parameters for the next Send Event Async action called.

Parameter Description
Parameter Parameter Name.
Value Parameter Value. Can be a string, a numeric value, or a stringified JSON object.

Screen View

Reports a screen view to measure specific screen views in Google Analytics

Parameter Description
Screen Name Screen name. Example: Menu, CharacterSelection, etc.
Application Name Your application/game name. Example: MyCoolGame, SuperGameApp, etc

Conditions


Is Active

Returns true if the GA4 engine is ready. Be aware that GA4 collects automatic metrics. If you do not want metrics to be collected, do not initialize any GA4 Property Id.

On Initialized

Triggered when GA4 initialization is completed only with Manual Initialization. For automatic initialization, this condition has no effect, use "Is Active" instead