KapsoEx.WhatsApp.ConversionEvents (kapso_ex v0.1.0)

Copy Markdown View Source

Meta Conversions API for WhatsApp: datasets and conversion events.

Get or create the WABA dataset first, then send events to its ID. Not supported on sandbox numbers.

Summary

Functions

Creates the dataset of a WABA. Attributes: dataset_name.

Gets the dataset of a WABA and remembers the association. Params: fields.

Sends conversion events (Meta Conversions API payloads) to a dataset.

Types

result()

@type result() :: {:ok, map()} | {:error, KapsoEx.Error.t()}

Functions

create_dataset(client, business_account_id, attrs \\ %{})

@spec create_dataset(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()

Creates the dataset of a WABA. Attributes: dataset_name.

get_dataset(client, business_account_id, params \\ [])

@spec get_dataset(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()

Gets the dataset of a WABA and remembers the association. Params: fields.

send_events(client, dataset_id, events, opts \\ [])

@spec send_events(KapsoEx.Client.t(), String.t(), [map()], keyword()) :: result()

Sends conversion events (Meta Conversions API payloads) to a dataset.

Options

  • :test_event_code - send as test events, shown in Events Manager.