Knowledge Base
HomeMain site
HomeMain site
General SetupWebsite SnippetsAPI Endpoints
General SetupWebsite SnippetsAPI Endpoints
  1. GA4 Measurement Protocol
  • DRE Measurement Protocol
    • Order (create)
      POST
    • Order (cancel)
      POST
    • Lead (create)
      POST
    • Batch (create)
      POST
  • GA4 Measurement Protocol
    • Batch (create)
      POST
  • 4WP Measurement Protocol
    • Elementor Forms Lead (create)
      POST
  1. GA4 Measurement Protocol

Batch (create)

TEST environment
https://{{BASE_DOMAIN}}/a2/test
TEST environment
https://{{BASE_DOMAIN}}/a2/test
POST
https://{{BASE_DOMAIN}}/a2/test
/mp4/collect

Request

Query Params

Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://dre2.yourdomain.com/a2/test/mp4/collect?measurement_id&api_secret=&id=' \
--header 'X-Dre-Access-Token;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "client_id": "string",
    "user_id": "string",
    "events": [
        {
            "name": "purchase",
            "params": {
                "currency": "string",
                "value": 0.59,
                "coupon": "string",
                "tax": 0,
                "transaction_id": "string",
                "items": [
                    {
                        "item_id": "string",
                        "item_group_id": "123456",
                        "item_sku": "123456",
                        "item_group_sku": "string",
                        "item_name": "string",
                        "item_variant": "string",
                        "item_brand": "No Brand",
                        "item_category": "Shoes",
                        "item_category2": "string",
                        "item_category3": "string",
                        "item_category4": "string",
                        "item_category5": "string",
                        "currency": "RON",
                        "price": 12.34,
                        "discount": 0,
                        "coupon": "string",
                        "item_tax_percent": 0,
                        "quantity": 1,
                        "item_stock_status": "true",
                        "index": 1
                    }
                ],
                "event_source": "website",
                "event_location_name": "string",
                "shipping": 0,
                "shipping_tier": "string",
                "shipping_warehouse_name": "string",
                "payment_type": "string",
                "ip_override": "string",
                "session_id": "string",
                "user_agent": "string"
            }
        }
    ],
    "user_data": {
        "email": "test@example.com",
        "sha256_email_address": "a8af8341993604f29cd4e0e5a5a4b5d48c575436c38b28abbfd7d481f345d5db",
        "phone_number": "+40744123123",
        "sha256_phone_number": "973dfe463ec85785f5f95af5ba3906eedb2d931c24e69824a89ea65dba4e813b",
        "address": {
            "first_name": "John",
            "sha256_first_name": "d63d71f407ad92113aa5b858936038d68e0fde0a7ed8b8a03a4fea2c2eab80d5",
            "last_name": "Doe",
            "sha256_last_name": "d63d71f407ad92113aa5b858936038d68e0fde0a7ed8b8a03a4fea2c2eab80d5",
            "country": "RO",
            "region": "string",
            "city": "Bucuresti",
            "street": "string",
            "postal_code": "700000"
        }
    },
    "user_properties": {
        "custom_user_property_name": {
            "value": "string"
        },
        "second_user_property_name": {
            "value": "string"
        }
    },
    "consent": {
        "ad_user_data": "GRANTED",
        "ad_personalization": "GRANTED"
    }
}'
Response Response Example
{}
Modified at 2024-04-11 20:00:56
Previous
Batch (create)
Next
Elementor Forms Lead (create)
Built with