googleAnalytics.* — Google Analytics

Type Library
Revision 2017.3060
Keywords analytics, Google Analytics, googleAnalytics
Platforms Android, iOS
Sample https://github.com/coronalabs/plugins-sample-googleAnalytics

Overview

The Google Analytics plugin lets you measure the value of your app across all stages, discover what keeps users engaged, and learn how to make your app more successful.

Registration

Before implementing the Google Analytics plugin, you must register for Google Analytics and obtain the tracking ID for your account.

Syntax

local googleAnalytics = require( "plugin.googleAnalytics" )

Functions

Project Settings

To use this plugin, add an entry into the plugins table of build.settings. When added, the build server will integrate the plugin during the build phase.

settings =
{
    plugins =
    {
        ["plugin.googleAnalytics"] =
        {
            publisherId = "com.coronalabs"
        },
    },      
}
Note

For Android, the following permissions/features are automatically added when using this plugin:

  • "android.permission.INTERNET"
  • "android.permission.ACCESS_NETWORK_STATE"

Support