googleAnalytics.logScreenName()

Type Function
Return value none
Revision Release 2022.3683
Keywords analytics, Google Analytics, Google Analytics v2, googleAnalytics, googleAnalytics v2, logScreenName
See also googleAnalytics.init()
googleAnalytics.logEvent()
googleAnalytics.*

Overview

Logs the screen name with Google Analytics.

Syntax

googleAnalytics.logScreenName( screenName )
screenName (required)

String. The screen/scene name to log, for example "main_menu".

Example

local googleAnalytics = require( "plugin.googleAnalytics" )

-- Initialize Google Analytics
googleAnalytics.init( )

-- Log screen name with Google Analytics
googleAnalytics.logScreenName( "main_menu" )