> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryprofound.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Adobe Experience Manager

> This documentation explains how to set up Adobe Experience Manager as a Cloud Service (AEMaaCS) Log Forwarding to deliver CDN logs to the Profound Agent Analytics platform.

<Warning>
  **This integration is in BETA.** Behavior, supported fields, and configuration steps may change as we onboard the first cohort of customers. If you hit any issues, please contact [support@tryprofound.com](mailto:support@tryprofound.com).
</Warning>

## Overview

The integration uses Adobe Experience Manager as a Cloud Service's self-serve HTTPS Log Forwarding to deliver CDN logs to our Agent Analytics API. AEM's CDN is Fastly-backed and streams logs continuously over HTTPS to the destination configured in your program. For more information about AEM Log Forwarding, [visit the Adobe documentation](https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/developing/log-forwarding).

## Prerequisites

* An AEM as a Cloud Service program with self-serve Log Forwarding enabled (sandbox-tier programs are not supported by Adobe and cannot forward logs)

* Cloud Manager access to commit to the program's Git repository and run a Config Pipeline

* A Profound Log Ingestion Token for Agent Analytics

## Configuration

<Steps>
  <Step title="Step 1">
    In Cloud Manager, add your Profound Log Ingestion Token as a secret variable on the environment(s) you want to forward logs from.

    Navigate to **Configuration → Environment Variables → Add** and configure:

    * **Name** — `PROFOUND_LOG_INGESTION_TOKEN`

    * **Type** — `Secret`

    * **Service Applied** — `All`

    * **Value** — Your provisioned Log Ingestion Token for Profound's Agent Analytics platform (`bot_PROFOUND_LOG_INGESTION_TOKEN`)
  </Step>

  <Step title="Step 2">
    Add a `logForwarding.yaml` file under a top-level `config/` directory in your program's Git repository. This is the folder structure required by AEM's Config Pipeline.

    ```yaml config/logForwarding.yaml theme={null}
    kind: "LogForwarding"
    version: "1"
    metadata:
      envTypes: ["prod"]
    data:
      https:
        default:
          enabled: true
          url: "https://artemis.api.tryprofound.com/v1/logs/aem"
          authHeaderName: "X-API-Key"
          authHeaderValue: "${{PROFOUND_LOG_INGESTION_TOKEN}}"
        aem:
          enabled: false
    ```

    `aem.enabled: false` disables forwarding of AEM application, Apache, and Dispatcher log families — only CDN logs are sent to Profound.

    `metadata.envTypes` scopes the configuration to specific environment types. Set it to `["prod"]` to forward only production CDN logs, or include `"stage"` and `"dev"` to forward those too. Omit the `metadata` block to apply to every environment the Config Pipeline targets.
  </Step>

  <Step title="Step 3 (optional)">
    AEM CDN logs do not include a referer field by default. To populate Profound's `referer` field, add a CDN request transformation that copies the incoming `Referer` header into a custom log property.

    Add the following to your program's CDN configuration file (for example, `config/cdn.yaml`):

    ```yaml config/cdn.yaml theme={null}
    kind: "CDN"
    version: "1"
    data:
      requestTransformations:
        rules:
          - name: profound-log-referer
            when: "*"
            actions:
              - type: set
                logProperty: referer
                value:
                  reqHeader: referer
    ```

    <Note>
      The `logProperty` name must be exactly lowercase `referer`. Variants like `Referer` or `referrer` will not be recognized and the field will silently remain empty.
    </Note>
  </Step>

  <Step title="Step 4">
    Deploy the configuration with a Cloud Manager **Config Pipeline** (Targeted Deployment).

    <Warning>
      `logForwarding.yaml` and CDN config files are deployed only by a Config Pipeline. Full Stack and Web Tier pipelines do not deploy these files.
    </Warning>

    1. In Cloud Manager, go to **Pipelines → Add Pipeline → Targeted Deployment → Config Pipeline**.

    2. Point the pipeline at the branch holding `config/logForwarding.yaml` (and `config/cdn.yaml` if you configured one).

    3. Target the environment(s) where log forwarding should be active.

    4. Run the pipeline.
  </Step>
</Steps>

<Note>
  On first delivery, AEM's underlying Fastly delivery layer issues a one-time HTTP challenge to `/.well-known/fastly/logging/challenge` to validate the destination. Profound's endpoint handles this automatically — no action required on your side. If you inspect Cloud Manager logs and see a single challenge request, this is expected.
</Note>

<Check>That's it! AEM will now send CDN logs to Profound. Data should begin appearing in your dashboard within a few minutes.</Check>

## What gets captured

AEM CDN log entries are mapped to Profound's visit schema as follows:

* Time and IP

  * `timestamp` — Time the CDN received the request.

  * `cli_ip` — Client IP address.

* Request

  * `host` — Host header from the client request.

  * `url` — Path and query string requested.

  * `method` — HTTP method.

  * `req_ua` — User-Agent header reported by the client.

  * `referer` — Referer header (only populated when the optional CDN request transformation in Step 3 is deployed).

* Response

  * `status` — HTTP response status code.

  * `ttfb` — Time to first byte, in milliseconds.

  * Response body size — Adobe's CDN log schema does not emit a native response-size field, so this is reported as `0` during BETA.

## Troubleshooting

* If logs aren't appearing, confirm the pipeline that deployed was a **Config Pipeline** — not Full Stack or Web Tier

* If the pipeline succeeds but no requests reach Profound, the program may still be on Adobe's legacy support-ticket log forwarding. File a ticket with Adobe to migrate to self-serve Log Forwarding before retrying

* If volume looks roughly 2× expected, legacy and self-serve log forwarding may be running in parallel during a migration window — Adobe typically resolves this within a few hours

* For `401` or `403` responses, verify `PROFOUND_LOG_INGESTION_TOKEN` is set with **Service Applied: All** and that the token is active in Profound

* Confirm the `url` begins with `https://` — AEM rejects the configuration at deploy time otherwise

* Ensure `aem.enabled: false` is present so non-CDN log families are not forwarded

## Additional Resources

* [Adobe — Log Forwarding for AEM as a Cloud Service](https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/developing/log-forwarding)

* [Adobe — CDN log entry format](https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/developing/logging#cdn-log)

* [Adobe — Use Config Pipelines](https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/operations/config-pipeline)

* Contact [support@tryprofound.com](mailto:support@tryprofound.com) for API-related questions

## Security Considerations

* Store the Log Ingestion Token as a Cloud Manager secret variable, never as a plaintext environment value

* Regularly rotate your Log Ingestion Token

* Monitor log forwarding activity for unusual patterns
