Method: logImpressions

Logs new events when playable locations are displayed, and when they are interacted with.

Impressions are not partially saved; either all impressions are saved and this request succeeds, or no impressions are saved, and this request fails.

HTTP request

POST https://playablelocations.googleapis.com/v3:logImpressions

The URL uses gRPC Transcoding syntax.

Request body

The request body contains data with the following structure:

JSON representation
{
  "impressions": [
    {
      object(Impression)
    }
  ],
  "requestId": string,
  "clientInfo": {
    object(ClientInfo)
  }
}
Fields
impressions[]

object(Impression)

Required. Impression event details. The maximum number of impression reports that you can log at once is 50.

requestId

string

Required. A string that uniquely identifies the log impressions request. This allows you to detect duplicate requests. We recommend that you use UUIDs for this value. The value must not exceed 50 characters.

You should reuse the requestId only when retrying a request in case of failure. In this case, the request must be identical to the one that failed.

clientInfo

object(ClientInfo)

Required. Information about the client device. For example, device model and operating system.

Response body

If successful, the response body will be empty.

Impression

Encapsulates impression event details.

JSON representation
{
  "locationName": string,
  "impressionType": enum(ImpressionType),
  "gameObjectType": number
}
Fields
locationName

string

Required. The name of the playable location.

impressionType

enum(ImpressionType)

Required. The type of impression event.

gameObjectType

number

An arbitrary, developer-defined type identifier for each type of game object used in your game.

Since players interact with differ types of game objects in different ways, this field allows you to segregate impression data by type for analysis.

You should assign a unique gameObjectType ID to represent a distinct type of game object in your game.

For example, 1=monster location, 2=powerup location.

ImpressionType

The type of impression event.

Enums
IMPRESSION_TYPE_UNSPECIFIED Unspecified type. Do not use.
PRESENTED The playable location was presented to a player.
INTERACTED A player interacted with the playable location.

Send feedback about...

Google Maps Platform gaming solution
Google Maps Platform gaming solution