Noizu.Google.Api.AnalyticsAdmin.Properties (Noizu Google v0.2.3)

Copy Markdown View Source

Google Analytics Admin API — Properties (GA4).

REST base: https://analyticsadmin.googleapis.com/v1beta/properties

Docs: https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1beta/properties

Summary

Functions

POST properties — create a GA4 property.

DELETE soft-deletes via Admin API properties/{property} DELETE (moves property to trash; restore is a separate operation).

GET properties/{property} — get a GA4 property.

GET properties — list properties.

PATCH properties/{property} — update a property.

Types

opts()

@type opts() :: keyword() | map()

result()

@type result() :: {:ok, term()} | {:error, Noizu.Google.Error.t()}

Functions

create(body, opts \\ [])

@spec create(map(), opts()) :: result()

POST properties — create a GA4 property.

Body example:

%{
  parent: "accounts/123456",
  displayName: "Example",
  timeZone: "America/Los_Angeles",
  currencyCode: "USD",
  industryCategory: "TECHNOLOGY"
}

delete(property, opts \\ [])

@spec delete(String.t(), opts()) :: result()

DELETE soft-deletes via Admin API properties/{property} DELETE (moves property to trash; restore is a separate operation).

get(property, opts \\ [])

@spec get(String.t(), opts()) :: result()

GET properties/{property} — get a GA4 property.

property may be "properties/123" or just "123".

list(opts \\ [])

@spec list(opts()) :: result()

GET properties — list properties.

Requires a filter, typically:

filter: "parent:accounts/123456"

Optional opts: :filter (required by API), :page_size, :page_token, :show_deleted.

patch(property, body, opts \\ [])

@spec patch(String.t(), map(), opts()) :: result()

PATCH properties/{property} — update a property.

Optional opts: :update_mask (field mask string, e.g. "displayName,timeZone").