From 9e6ca390d65a89f46042ff6cb761a68524ab6626 Mon Sep 17 00:00:00 2001 From: tdroberto Date: Mon, 30 Dec 2024 15:58:05 +0900 Subject: [PATCH] add datalayer papi treasure box --- integration-box/datalayer_papi/README.md | 24 ++++ .../datalayer_papi/datalayer_papi.html | 106 ++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 integration-box/datalayer_papi/README.md create mode 100644 integration-box/datalayer_papi/datalayer_papi.html diff --git a/integration-box/datalayer_papi/README.md b/integration-box/datalayer_papi/README.md new file mode 100644 index 00000000..ffad761d --- /dev/null +++ b/integration-box/datalayer_papi/README.md @@ -0,0 +1,24 @@ +# Data Layer Profile API + +---- +## Overview + +This project provides a solution to ingesting data from data layers (e.g. data coming from Adobe Experience Manager) residing on a frontend (e.g. customer's website), and on a subsequent PAPI call, we can fetch segment data from TD for near real-time (web) personalization. + +---- +## Implementation +1. Copy and paste this code into customer's GTM container as a new tag (recommended) or inject it into their website directly. +2. Change values for write-only API key, database, table, PAPI token and servlet host (if applicable). +3. If GTM, make sure to set up the correct triggering. Page view works well. + +---- +## Considerations + +There is a more direct and efficient way to retrieve data from source applications, like AEM. However, that involves more development work on the client's side. + +This solution relies on a servlet in the backend that translates segment ids to segment names using TD's Audience API. This step would become obsolete in the near future, since PAPI will send segment names as well by default. + +---- +## Questions + +Please feel free to reach out to apac-se@treasure-data.com with any questions you have about using this code. diff --git a/integration-box/datalayer_papi/datalayer_papi.html b/integration-box/datalayer_papi/datalayer_papi.html new file mode 100644 index 00000000..becf1b26 --- /dev/null +++ b/integration-box/datalayer_papi/datalayer_papi.html @@ -0,0 +1,106 @@ +