Updating a Google Analytics 4 Configurations

Using the PUT method with the Users endpoint will allow you to Update an existing User

Updating a Google Analytics 4 configuration will replace the entire configuration with the specified message body, so it is critical to specify the new configuration in its entirety. Updates to individual parameters with an incomplete payload will overwrite the existing configuration

PUThttps://edgeapi.marchex.io/marketingedge/v5/api/users/<integrationconfigurationid>

{
  "configuration_name": "GoogleAnalytics4 Integration Name",
  "configuration": {
    "measurement_id": "5244322e-083f-4574-bdea-64c824831ca4",
    "api_secret": "secret-key"
  },
  "config_data": {
    "session_based_dni_upload_criteria": "All",
    "events": [
      {
        "name": "Name",
        "call_criteria": "AllMatchedCalls",
        "min_duration_value": 0
      }
    ],
    "event_parameters": [
      {
        "name": "Name",
        "static_value": true,
        "value": "1"
      }
    ],
    "user_parameters": [
      {
        "name": "Name",
        "static_value": true,
        "value": "1"
      }
    ]
  },
  "domain_access": {
    "billing_groups": [
      "4455",
      "4456"
    ],
    "group_owners": [
      "33344",
      "44433"
    ]
  },
}

If the request is handled successfully, the following response will be returned:

{
  "integration_configuration_id": "7d58c388-2acf-40a4-9836-54b770270677",
  "configuration_name": "GoogleAnalytics4 Integration Name",
  "type": "GoogleAnalytics4",
  "configuration": {
    "measurement_id": "5244322e-083f-4574-bdea-64c824831ca4",
    "api_secret": "secret-key"
  },
  "config_data": {
    "session_based_dni_upload_criteria": "All",
    "events": [
      {
        "name": "Name",
        "call_criteria": "AllMatchedCalls",
        "min_duration_value": 0
      }
    ],
    "event_parameters": [
      {
        "name": "Name",
        "static_value": true,
        "value": "1"
      }
    ],
    "user_parameters": [
      {
        "name": "Name",
        "static_value": true,
        "value": "1"
      }
    ]
  },
  "status": "enabled",
  "domain_access": {
    "billing_groups": [
      "4455",
      "4456"
    ],
    "group_owners": [
      "33344",
      "44433"
    ]
  },
  "created_datetime": "2023-04-06T13:35:07.931Z",
  "modified_datetime": "2023-04-06T13:35:07.931Z"
}

Fields that are used when creating a GA4 Integration Configuration

Parameter

Type

Details

Other

configuration_name

string

Required

configuration -> measurement_id

string

Required

configuration -> api_secret

string

Required

config_data -> session_based_dni_upload_criteria

string

  • All
  • Session-Matched
  • Google Client ID

Required

events

array

Array of Events
Min = 1
Max = 10

events -> name

string

events -> call_criteria

string

  • All Matched Calls
  • Min Duration
  • Call Tag

events -> min_duration_value

int

Required If call_criteria is set to Min Duration

events -> call_tag

string

call_tag_id

Required If call_criteria is set to Call Tag

event_parameters

array

Array of Event_Parameters
Min = 0
Max = 25

event_parameters -> name

string

event_parameters -> static_value

boolean

true, false

event_parameters -> value

string

static = true, user provided value
static = false, see below for valid options

user_parameters

array

Array of User_Parameters
Min = 0
Max = 25

user_parameters -> name

string

user_parameters -> static_value

boolean

true, false

user_parameters -> value

string

static = true, user provided value
static = false, see below for valid options

domain_access

object

Minimum of one billing_group or group_owner

domain_access -> billing_groups

array

Array of billing_group_id

domain_access -> group_owners

array

Array of group_owner_id

List of supported Values for event_parameters and user_parameters