Notifiche per le visualizzazioni preacquisite

Una o più notifiche possono essere inviate tramite una singola chiamata di consegna. Determina se la metrica da tracciare è un click o display per ogni mbox in modo che il tipo di notifica possa essere riflesso correttamente. Inoltre, passa un id per ogni notifica in modo che si possa determinare se una notifica è stata inviata correttamente tramite la API di consegna Adobe Target. La marca temporale è importante anche da inoltrare a Target per indicare quando si è verificato click o display per una determinata visualizzazione a scopo di reporting.

curl -X POST \
  'https://demo.tt.omtrdc.net/rest/v1/delivery?client=demo&sessionId=d359570e04f14e1faeeba02d6ab9914e' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
  "id": {
    "tntId": "84e8d0e211054f18af365d65f45e902b.28_131"
  },
  "context": {
    "channel": "web",
    "browser": {
      "host": "target.enablementadobe.com"
    },
    "address": {
      "url": "https://target.enablementadobe.com/react/demo/#/"
    }
  },
  "notifications": [{
      "id": "228",
      "type": "display",
      "timestamp": 1556226121884,
      "tokens": ["N3C13I0M2PH8iaKtONJlFJNWHtnQtQrJfmRrQugEa2qCnQ9Y9OaLL2gsdrWQTvE54PwSz67rmXWmSnkXpSSS2Q=="],
      "view": {
        "name": "checkout-express",
      }
    },
    {
      "id": "5",
      "type": "display",
      "timestamp": 1556226121884,
      "tokens": ["N3C13I0M2PH8iaKtONJlFJNWHtnQtQrJfmRrQugEa2qCnQ9Y9OaLL2gsdrWQTvE54PwSz67rmXWmSnkXpSSS2Q=="],
      "view": {
        "name": "home",
      }
    },
    {
      "id": "6",
      "type": "display",
      "timestamp": 1556226121884,
      "tokens": ["N3C13I0M2PH8iaKtONJlFJNWHtnQtQrJfmRrQugEa2qCnQ9Y9OaLL2gsdrWQTvE54PwSz67rmXWmSnkXpSSS2Q=="],
      "view": {
        "name": "products",
      }
    }
  ]
}'

La chiamata di esempio precedente darà luogo a una risposta che indica che la richiesta notifications è stata elaborata correttamente.

{
    "status": 200,
    "requestId": "85cc7394-c19a-4398-9b8b-bbee1e4c4579",
    "client": "demo",
    "id": {
        "tntId": "84e8d0e211054f18af365d65f45e902b.28_131"
    },
    "edgeHost": "mboxedge28.tt.omtrdc.net",
    "notifications": [
        {
            "id": "5"
        },
        {
            "id": "6"
        },
        {
            "id": "228"
        }
    ]
}

Se tutti i notifications inviati a Target sono elaborati correttamente, verranno visualizzati nell’array notifications nella risposta. Tuttavia, se manca un notifications id, quella particolare notifica non è stata eseguita. In questo scenario, è possibile implementare una logica di nuovo tentativo fino a quando non viene recuperata una risposta di notifica corretta. Assicurati che nella logica di esecuzione di un nuovo tentativo sia specificato un timeout in modo che la chiamata API non si blocchi e non provochi ritardi nelle prestazioni.

Traduzione automatica
Utilizza il Selettore lingua per visualizzare la versione inglese della pagina.
Questa traduzione è stata utile?

Ask AI

Not sure where to start?
Ask me anything about Adobe products.

Type your question or pick a suggestion below.

Use of this AI chatbot is subject to Adobe's Privacy Policy. Don't share sensitive data. AI responses are not your Content, may be inaccurate, and any offers provided are non-binding. Generative AI Terms.