Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.

Event Forwarding - How to use RTCDP profiles data ?

Avatar

Level 2

Hello !

 

We would like to use the event forwarding capabilities to do some Google Enchanced Conversion, but this need the hashed email/phone of the visitor for correct visitor matching at Google side.

 

We do not store the hashed email/phone information in the front-end but we have a visitor first-party "InternalID" that is used for the RTCDP profiles.

So our front-end requests from the WebSDK contain pages informations, the transaction ID and the first-party "InternalID". And in the datastream it is then dispatch to Analytics, RTCDP and the Event Forwarding.

 

Is there any way in the event forwarding to match the "InternalID" with existing RTCDP profiles to dynamically get profiles information and enrich the event forwarding request with it ?

 

Example :

- A visitor visit our website and have an internal ID "abcd1234" and buy a product. The WebSDK is sending a request to the datastream containing the page data, transaction, and the "abcd1234" first-party ID.

- In the Datastream, the data is dispatched to Analytics for reporting, RTCDP for the profiles, and in the Event Forwarding

- In the Event Forwarding, we have access to the "abcd1234" ID and with it we need to get access to other profile informations that are saved by our daily imports (hashed email/phone)

- Final steps is to send a request to Google with these hashed email/phone

 

Kind regards,

Julien

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

4 Replies

Avatar

Community Advisor

Hi Julien,

as far as I remember, Adobe once told me that it might come at some point, but currently, the event data sent via the Web SDK to the Edge Network takes a sharp left to end up on the Launch SSF instance, before it actually hits the CDP's Profile processing.

In other words: Launch currently only has the raw event data from your Web SDK call.
So, if you do not have the required information available in your frontend, you must check whether you can tap into the AEP APIs to pull out Profile information out, using your available identities.


A starting point to do so should be this documentation


Disclaimer: I haven't done it myself, I have only used SSF to push Profile data into the Platform.

 

I managed to find a dummy code to access Profile information (based on the ECID) that I once used to print profile information on a test page (Launch client-side).
I basically used the AEP Postman workspace and adapted some sample calls.

 

Maybe a starting point. Let me know if that helps

 

 

 

const ENTITY_ID = _satellite.getVar("ECID");
if (ENTITY_ID) {
    console.log(">>> ECID not found");
    return;
}

const API_KEY = "xxx";
const ACCESS_TOKEN = "yyy;
const ORG_ID = "zzz@AdobeOrg";
const SANDBOX_NAME = "mysandbox";
const SCHEMA_NAME = "_xdm.context.profile";
const ENTITY_NAMESPACE = "ecid";
const ENDPOINT = `https://platform.adobe.io/data/core/ups/access/entities?relatedSchema.name=${SCHEMA_NAME}&entityId=${ENTITY_ID}&entityIdNS=${ENTITY_NAMESPACE}&schema.name=${SCHEMA_NAME}`;

const headers = {
    "Accept": "application/json",
    "Accept-Encoding": "gzip, deflate, br",
    "Authorization": `Bearer ${ACCESS_TOKEN}`,
    "x-api-key": API_KEY,
    "x-gw-ims-org-id": ORG_ID,
    "x-sandbox-name": SANDBOX_NAME
};

const body = {
    "relatedSchema.name": SCHEMA_NAME,
    "schema.name": SCHEMA_NAME,
    "entityId": ENTITY_ID,
    "entityIdNS": ENTITY_NAMESPACE
}

fetch(ENDPOINT, {
    method: 'GET',
    headers: headers
}).then(async (res) => {
    const body = await res.json();

    // first level attribute of the JSON is the entity id which we skip, go to second level right away
    const keys = Object.keys(body);
    // console.log(">>> Keys: " + keys);
    if (keys.length > 0) {
        const key = keys[0];
        const entity = body[key];

        const entityData = entity.entity;
        if (entityData) {

            const desiredEntityAttributes = ["_yourOrg", "person", "identityMap"];

            // merge all desired attributes into one object
            const mergedAttributes = {};
            for (const desiredEntityAttribute of desiredEntityAttributes) {
                if (entityData.hasOwnProperty(desiredEntityAttribute)) {
                    const attribute = entityData[desiredEntityAttribute];
                    Object.assign(mergedAttributes, attribute);
                }
            }
            console.log(">>> This is what we know about you so far: " + JSON.stringify(mergedAttributes, 0, 2));

            window.aep_profile = mergedAttributes;
        }
    }
}).catch((err) => {
    _satellite.logger.error(`>>> PROFILE API ERROR: ${err}`);
});

 

 

 

Cheers from Switzerland!


Avatar

Level 2

Oh thanks a lot for the detailed informations !

 

It is what I wanted to avoid, maybe Adobe modified the way the Edge network works but if not I will certainly try this solution.

 

I also contacted the support and if we have another solution I will add it here

 

Have a great day!

Avatar

Community Advisor

Yes, it would be amazing if they could enrich the raw data with profile information, so you can use it in SSF.

Let's see what support says, please keep us posted

Cheers from Switzerland!


Avatar

Administrator

@julienc30593385 Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni