🍎
Comprehensive Technical Tutorial for AEP
  • Comprehensive Technical Tutorial for Adobe Experience Platform
    • Architecture
    • Video Overview
  • 0 - Getting started
    • 0.0 Which environment do I use?
    • (Deprecated) Install the Chrome extension for the Experience League documentation
    • 0.1 Use Demo System Next to setup your Adobe Experience Platform Data Collection client property
    • 0.2 Create your Datastream
    • 0.3 Set up the website
    • 0.4 Set up the mobile app
    • 0.5 Ingest Data to AEP through the Website
    • 0.6 Ingest Data to AEP through the Mobile App
    • 0.7 Visualize your own Real-time Customer Profile - UI
    • 0.8 See your Real-time Customer Profile in action in the Call Center
    • 0.9 Set up and use the AEP API to visualize your Real-Time Customer Profile
    • 0.10 Install the Experience Platform Debugger Extension
    • 0.11 What if I want to demonstrate basic AEP concepts directly on a live website?
  • 1 - Adobe Experience Platform Data Collection and the Web SDK extension
    • 1.1 Understanding Adobe Experience Platform Data Collection
    • 1.2 Edge Network, Datastreams and Server Side Data Collection
    • 1.3 Introduction to Adobe Experience Platform Data Collection
    • 1.4 Client-side Web Data Collection
    • 1.5 Implement Adobe Analytics and Adobe Audience Manager
    • 1.6 Implement Adobe Target
    • 1.7 XDM Schema requirements in Adobe Experience Platform
    • Summary and Benefits
  • 2 - Data Ingestion
    • 2.1 Explore the Website
    • 2.2 Configure Schemas and Set Identifiers
    • 2.3 Configure Datasets
    • 2.4 Data Ingestion from Offline Sources
    • 2.5 Data Landing Zone
    • Summary and Benefits
  • 3 - Real-time Customer Profile
    • 3.1 Visit the website
    • 3.2 Visualize your own real-time customer profile - UI
    • 3.3 Visualize your own real-time customer profile - API
    • 3.4 Create a segment - UI
    • 3.5 Create a segment - API
    • 3.6 See your Real-time Customer Profile in action in the Call Center
    • Summary and benefits
  • 4 - Query Service
    • 4.0 Prerequisites
    • 4.1 Getting Started
    • 4.2 Using the Query Service
    • 4.3 Queries, queries, queries... and churn analysis
    • 4.4 Generate a dataset from a query
    • 4.5 Query Service and Power BI
    • 4.6 Query Service and Tableau
    • 4.7 Query Service API
    • Summary and benefits
  • 5 - Intelligent Services
    • 5.1 Customer AI - Data Preparation (Ingest)
    • 5.2 Customer AI - Create a New Instance (Configure)
    • 5.3 Customer AI - Scoring Dashboard and Segmentation (Predict & Take Action)
  • 6 - Real-time CDP - Build a segment and take action
    • 6.1 Create a segment
    • 6.2 Review how to configure DV360 Destination using Destinations
    • 6.3 Take Action: send your segment to DV360
    • 6.4 Take Action: send your segment to an S3-destination
    • 6.5 Take Action: send your segment to Adobe Target
    • 6.6 External Audiences
    • 6.7 Destinations SDK
    • Summary and benefits
  • 7 - Adobe Journey Optimizer: Orchestration
    • 7.1 Create your event
    • 7.2 Create your journey and email message
    • 7.3 Update your Data Collection property and test your journey
    • Summary and benefits
  • 8 - Adobe Journey Optimizer: External data sources and custom actions
    • 8.1 Define an event
    • 8.2 Define an external data source
    • 8.3 Define a custom action
    • 8.4 Create your journey and messages
    • 8.5 Trigger your journey
    • Summary and benefits
  • 9 - Adobe Journey Optimizer: Offer Decisioning
    • 9.1 Offer Decisioning 101
    • 9.2 Configure your offers and decision
    • 9.3 Prepare your Data Collection Client property and Web SDK setup for Offer Decisioning
    • 9.4 Combine Adobe Target and Offer Decisioning
    • 9.5 Use your decision in an email
    • 9.6 Test your decision using the API
    • Summary and benefits
  • 10 - Adobe Journey Optimizer: Event-based Journeys
    • 10.1 Configure an event-based journey - Order Confirmation
    • 10.2 Configure a batch-based newsletter journey
    • 10.3 Apply personalization in an email message
    • 10.4 Setup and use push notifications
    • 10.5 Create a business event journey
    • Summary and benefits
  • 11 - Customer Journey Analytics - Build a dashboard using Analysis Workspace on top of Adobe Experie
    • 11.1 Customer Journey Analytics 101
    • 11.2 Connect Adobe Experience Platform Data Sets in Customer Journey Analytics
    • 11.3 Create a Data View
    • 11.4 Data Preparation in Customer Journey Analytics
    • 11.5 Visualization using Customer Journey Analytics
    • Summary and benefits
  • 12 - Ingest & Analyze Google Analytics data in Adobe Experience Platform with the BigQuery Source Co
    • 12.1 Create your Google Cloud Platform Account
    • 12.2 Create your first query in BigQuery
    • 12.3 Connect GCP & BigQuery to Adobe Experience Platform
    • 12.4 Load data from BigQuery into Adobe Experience Platform
    • 12.5 Analyze Google Analytics Data using Customer Journey Analytics
    • Summary and benefits
  • 13 - Real-Time CDP: Segment Activation to Microsoft Azure Event Hub
    • 13.1 Configure your Microsoft Azure EventHub environment
    • 13.2 Configure your Azure Event Hub Destination in Adobe Experience Platform
    • 13.3 Create a segment
    • 13.4 Activate segment
    • 13.5 Create your Microsoft Azure Project
    • 13.6 End-to-end scenario
    • Summary and benefits
  • 14 - Real-Time CDP Connections: Event Forwarding
    • 14.1 Create a Data Collection Event Forwarding property
    • 14.2 Update your Datastream to make data available to your Data Collection Event Forwarding property
    • 14.3 Create and configure a custom webhook
    • 14.4 Create and configure a Google Cloud Function
    • 14.5 Forward events towards the AWS ecosystem
    • Summary and benefits
  • 15 - Stream data from Apache Kafka into Adobe Experience Platform
    • 15.1 Introduction to Apache Kafka
    • 15.2 Install and configure your Kafka cluster
    • 15.3 Configure HTTP API Streaming endpoint in Adobe Experience Platform
    • 15.4 Install and configure Kafka Connect and the Adobe Experience Platform Sink Connector
    • Summary and benefits
Powered by GitBook
On this page
  • 14.4.1 Create your Google Cloud Function
  • 14.4.2 Update your Event Forwarding property: Data Elements
  • 14.4.3 Update your Event Forwarding property: Update a Rule
  • 14.3.4 Test your configuration
  1. 14 - Real-Time CDP Connections: Event Forwarding

14.4 Create and configure a Google Cloud Function

Create and configure a Google Cloud Function

Previous14.3 Create and configure a custom webhookNext14.5 Forward events towards the AWS ecosystem

Last updated 2 years ago

14.4.1 Create your Google Cloud Function

Go to https://console.cloud.google.com/. Go to Cloud Functions.

You'll then see this. Click CREATE FUNCTION.

You'll then see this.

Make the following choices:

  • Function name: --demoProfileLdap---event-forwarding

  • Region: select any region

  • Trigger Type: select HTTP

  • Authentication: select Allow unauthenticated invocations

You should now have this. Click SAVE.

Click NEXT.

You'll then see this:

Make the following choices:

  • Runtime: select Node.js 16 (or more recent)

  • Entry point: enter helloAEP

Click ENABLE API to enable Cloud Build API. You'll then see a new window. In that new window, click ENABLE again.

You'll then see this. Click Enable.

Once Cloud Build API has been enabled, you'll see this.

Go back to your Cloud Function. In your Cloud Function Inline Editor, make sure you have the following code there:

/**
 * Responds to any HTTP request.
 *
 * @param {!express:Request} req HTTP request context.
 * @param {!express:Response} res HTTP response context.
 */
exports.helloAEP = (req, res) => {
  let message = req.query.message || req.body.message || 'Hello World!';
  res.status(200).send(message);
};

Next, click DEPLOY.

You'll then see this. Your Cloud Function is now being created. This may take a couple of minutes.

Once your function is created and running, you'll see this. Click on your function's name to open it.

You'll then see this. Go to TRIGGER. You'll then see the Trigger URL which is what you'll use to define the endpoint in Launch Server Side.

Copy the Trigger URL, which looks like this: https://europe-west1-dazzling-pillar-273812.cloudfunctions.net/vangeluw-event-forwarding.

In the next steps, you'll configure Adobe Experience Platform Data Collection Server to stream specific information about Page Views to your Google Cloud Function. Instead of just forwarding the full payload as-is, you'll only send things like ECID, timestamp and Page Name to your Google Cloud Function.

Here's an example of a payload that you'll need to parse to filter out the above mentioned variables:

{
  "events": [
    {
      "xdm": {
        "eventType": "web.webpagedetails.pageViews",
        "web": {
          "webPageDetails": {
            "URL": "https://builder.adobedemo.com/run/vangeluw-OCUC",
            "name": "vangeluw-OCUC",
            "viewName": "vangeluw-OCUC",
            "pageViews": {
              "value": 1
            }
          },
          "webReferrer": {
            "URL": "https://builder.adobedemo.com/run/vangeluw-OCUC/equipment"
          }
        },
        "device": {
          "screenHeight": 1080,
          "screenWidth": 1920,
          "screenOrientation": "landscape"
        },
        "environment": {
          "type": "browser",
          "browserDetails": {
            "viewportWidth": 1920,
            "viewportHeight": 451
          }
        },
        "placeContext": {
          "localTime": "2022-02-23T06:51:07.140+01:00",
          "localTimezoneOffset": -60
        },
        "timestamp": "2022-02-23T05:51:07.140Z",
        "implementationDetails": {
          "name": "https://ns.adobe.com/experience/alloy/reactor",
          "version": "2.8.0+2.9.0",
          "environment": "browser"
        },
        "_experienceplatform": {
          "identification": {
            "core": {
              "ecid": "08346969856929444850590365495949561249"
            }
          },
          "demoEnvironment": {
            "brandName": "vangeluw-OCUC"
          },
          "interactionDetails": {
            "core": {
              "channel": "web"
            }
          }
        }
      },
      "query": {
        "personalization": {
          "schemas": [
            "https://ns.adobe.com/personalization/html-content-item",
            "https://ns.adobe.com/personalization/json-content-item",
            "https://ns.adobe.com/personalization/redirect-item",
            "https://ns.adobe.com/personalization/dom-action"
          ],
          "decisionScopes": [
            "eyJ4ZG06YWN0aXZpdHlJZCI6Inhjb3JlOm9mZmVyLWFjdGl2aXR5OjE0YzA1MjM4MmUxYjY1MDUiLCJ4ZG06cGxhY2VtZW50SWQiOiJ4Y29yZTpvZmZlci1wbGFjZW1lbnQ6MTRiZjA5ZGM0MTkwZWJiYSJ9",
            "__view__"
          ]
        }
      }
    }
  ],
  "query": {
    "identity": {
      "fetch": [
        "ECID"
      ]
    }
  },
  "meta": {
    "state": {
      "domain": "adobedemo.com",
      "cookiesEnabled": true,
      "entries": [
        {
          "key": "kndctr_907075E95BF479EC0A495C73_AdobeOrg_identity",
          "value": "CiYwODM0Njk2OTg1NjkyOTQ0NDg1MDU5MDM2NTQ5NTk0OTU2MTI0OVIPCPn66KfyLxgBKgRJUkwx8AH5-uin8i8="
        },
        {
          "key": "kndctr_907075E95BF479EC0A495C73_AdobeOrg_consent_check",
          "value": "1"
        },
        {
          "key": "kndctr_907075E95BF479EC0A495C73_AdobeOrg_consent",
          "value": "general=in"
        }
      ]
    }
  }
}

These are the fields that contain the information that needs to be parsed out:

  • ECID: events.xdm._experienceplatform.identification.core.ecid

  • timestamp: timestamp

  • Page Name: events.xdm.web.webPageDetails.name

Let's go to Adobe Experience Platform Data Collection Server now, to configure the data elements to make that possible.

14.4.2 Update your Event Forwarding property: Data Elements

Go to https://experience.adobe.com/#/data-collection/ and go to Event Forwarding. Search your Event Forwarding property and click it to open it.

In the left menu, go to Data Elements. Click Add Data Element.

You'll then see a new data element to configure.

Make the following selection:

  • As the Name, enter customerECID.

  • As the Extension, select Core.

  • As the Data Element Type, select Path.

  • As the Path, enter arc.event.xdm.--aepTenantId--.identification.core.ecid. By entering this path, you'll be filtering out the field ecid from the event payload that is sent by the website or mobile app into the Adobe Edge.

In the above and below paths, a reference is made to arc. arc stands for Adobe Resource Context and arc always stands for the highest available object that is available in the Server Side context. Enrichments and transformations may be added to that arc object using Adobe Experience Platform Data Collection Server functions.

In the above and below paths, a reference is made to event. event stands for a unique event and Adobe Experience Platform Data Collection Server will always evaluate every event individually. Sometimes, you may see a reference to events in the payload sent by Web SDK Client Side, but in Adobe Experience Platform Data Collection Server, every event is evaluated individually.

You'll now have this. Click Save.

Click Add Data Element.

You'll then see a new data element to configure.

Make the following selection:

  • As the Name, enter eventTimestamp.

  • As the Extension, select Core.

  • As the Data Element Type, select Path.

  • As the Path, enter arc.event.xdm.timestamp. By entering this path, you'll be filtering out the field timestamp from the event payload that is sent by the website or mobile app into the Adobe Edge.

You'll now have this. Click Save.

Click Add Data Element.

You'll then see a new data element to configure.

Make the following selection:

  • As the Name, enter pageName.

  • As the Extension, select Core.

  • As the Data Element Type, select Path.

  • As the Path, enter arc.event.xdm.web.webPageDetails.name. By entering this path, you'll be filtering out the field name from the event payload that is sent by the website or mobile app into the Adobe Edge.

You'll now have this. Click Save.

You now have these data elements created:

14.4.3 Update your Event Forwarding property: Update a Rule

In the left menu, go to Rules. In the previous exercise, you created the rule All Pages. Click that rule to open it.

You'll then this. Click the + icon under Actions to add a new action.

You'll then see this.

Make the following selection:

  • Select the Extension: Adobe Cloud Connector.

  • Select the Action Type: Make Fetch Call.

That should give you this Name: Adobe Cloud Connector - Make Fetch Call. You should now see this:

Next, configure the following:

  • Change the request protocol from GET to POST

  • Enter the URL of the Google Cloud Function you created in one of the previous steps which looks like this: https://europe-west1-dazzling-pillar-273812.cloudfunctions.net/vangeluw-event-forwarding

You should now have this. Next, go to Body.

You'll then see this. Click the radio button for JSON.

Configure the Body as follows:

KEY
VALUE

customerECID

{{customerECID}}

pageName

{{pageName}}

eventTimestamp

{{eventTimestamp}}

You'll then see this. Click Keep Changes.

You'll then see this. Click Save.

You've now update your existing rule in a Adobe Experience Platform Data Collection Server property. Go to Publishing Flow to publish your changes. Open your Development library Main by clicking Edit as indicated.

Click the Add All Changed Resources button, after which you'll see your Rule and Data Element appear in this library. Next, click Save & Build for Development. Your changes are now being deployed.

After a couple of minutes, you'll see that the deployment is done and ready to be tested.

14.3.4 Test your configuration

Go to https://builder.adobedemo.com/projects. After logging in with your Adobe ID, you'll see this. Click your website project to open it.

You can now follow the below flow to access the website. Click Integrations.

On the Integrations page, you need to select the Data Collection property that was created in exercise 0.1.

You'll then see your demo website open up. Select the URL and copy it to your clipboard.

Open a new incognito browser window.

Paste the URL of your demo website, which you copied in the previous step. You'll then be asked to login using your Adobe ID.

Select your account type and complete the login process.

You'll then see your website loaded in an incognito browser window. For every demonstration, you'll need to use a fresh, incognito browser window to load your demo website URL.

When you open up your browser Developer View, you can inspect Network requests as indicated below. When you use the filter interact, you'll see the network requests that are sent by Adobe Experience Platform Data Collection Client to the Adobe Edge.

Switch your view to your Google Cloud Function and go to LOGS. You should now have a view similar to this one, with a number of log entries being shown. Every time you see Function execution started, it means that incoming traffic was received in your Google Cloud Function.

Let's update your function a bit to work with the incoming data, and display the information that was received from Adobe Experience Platform Data Collection Server. Go to SOURCE and click EDIT.

In the next screen, click NEXT.

Update your code like this:

/**
 * Responds to any HTTP request.
 *
 * @param {!express:Request} req HTTP request context.
 * @param {!express:Response} res HTTP response context.
 */
exports.helloAEP = (req, res) => {
  console.log('>>>>> Function has started. The following information was received from Event Forwarding:');
  console.log(req.body);

  let message = req.query.message || req.body.message || 'Hello World!';
  res.status(200).send(message);
};

You'll then have this. Click DEPLOY.

After a couple of minutes, your function will be deployed again. Click your function name to open it.

On your demo website, navigate to a product, like for instance DEIRDRE RELAXED-FIT CAPRI.

Switch your view to your Google Cloud Function and go to LOGS. You should now have a view similar to this one, with a number of log entries being shown.

For every page view on your demo website, you should now see a new log entry pop up in your Google Cloud Function's logs, which shows the received information.

You've now successfully sent data that was collected by Adobe Experience Platform Data Collection, in real-time, to a Google Cloud Function endpoint. From there, that data can be used by any Google Cloud Platform application, such as BigQuery for storage and reporting or for Machine Learning use cases.

GCP
GCP
GCP
GCP
GCP
GCP
GCP
GCP
GCP
GCP
GCP
GCP
GCP
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
Adobe Experience Platform Data Collection SSF
DSN
DSN
DSN
DSN
DSN
DSN
DSN
DSN
Adobe Experience Platform Data Collection Setup
Adobe Experience Platform Data Collection Setup
Adobe Experience Platform Data Collection Setup
Adobe Experience Platform Data Collection Setup
Adobe Experience Platform Data Collection Setup
Adobe Experience Platform Data Collection Setup
Adobe Experience Platform Data Collection Setup
Adobe Experience Platform Data Collection Setup