Set up Audience Manager with Platform Web SDK
Learn how to set up ۶Ƶ Audience Manager using the ۶Ƶ Experience Platform Web SDK and validate the implementation using a cookie destination.
۶Ƶ Audience Manager is the ۶Ƶ Experience Cloud solution that provides everything required to collect commercially relevant information about site visitors, create marketable segments, and serve targeted advertising and content to the right audience.
Learning objectives
At the end of this lesson, you will be able to:
- Configure a datastream to enable Audience Manager
- Enable a cookie destination in Audience Manager
- Validate the Audience Manager implementation by confirming audience qualification with ۶Ƶ Experience Platform Debugger
Prerequisites
To complete this lesson, you must first:
- Complete the earlier lessons in the Initial Configuration and Tags Configuration sections of this tutorial.
- Have access to ۶Ƶ Audience Manager and the appropriate permissions to create, read, and write traits, segments, and destinations. For more information, please review Audience Manager’s Role-Based Access Control.
Configure the datastream
The Audience Manager implementation using the Platform Web SDK differs from the implementation using server-side forwarding (SSF). Server-side forwarding passes ۶Ƶ Analytics request data to Audience Manager. A Platform Web SDK implementation passes XDM data sent to Platform Edge Network to Audience Manager. Audience Manager is enabled in the datastream:
-
Go to interface
-
On the left navigation, select Datastreams
-
Select the previously created
Luma Web SDK: Development Environment
datastream -
Select Add Service
-
Select ۶Ƶ Audience Manager as the Service
-
Confirm that Cookie Destinations Enabled and URL Destinations Enabled are selected
-
Select Save
Create a data source
Next, create a Data Source, a fundamental tool for organizing data within Audience Manager:
-
Go to the interface
-
Select Audience Data from the top navigation
-
Select the Data Sources from the drop-down menu
-
Select the Add New button from the top of the Data Sources page
-
Give the Data Source a friendly name and description. For initial setup, you can name this
Platform Web SDK tutorial
. -
Set ID Type to Cookie
-
In the Data Export Controls section, select No Restriction
-
Save the Data Source
Create a trait
After the Data Source is saved, set up a trait. Traits are a combination of one or more signals in Audience Manager. Create a trait for homepage visitors.
-
Select Audience Data > Traits
-
Select Add New > Rule-Based trait
-
Give your trait a friendly name and description,
Luma homepage view
-
Select the Data Source you created in the previous section.
-
Select a Folder in which to save your trait in the pane to the right. You may want to create a folder by selecting the + icon next to an existing parent folder. You can name this new folder
Platform Web SDK tutorial
. -
Expand the Trait Expression caret and select Expression Builder You must provide a key value pair that signifies a homepage visit.
-
Open the (mapped to your tag property) and the ۶Ƶ Experience Platform Debugger and refresh the page.
-
Look at the Network Requests and the event details for the Platform Web SDK to find the key and name value for the homepage.
-
Return to the Expression Builder in the Audience Manager UI and enter the key as
web.webPageDetails.name
and the value ofcontent:luma:us:en
. This step ensures that you fire a trait whenever you load the homepage. -
Save the trait.
Create a segment
The next steps are to create a segment and assign your newly defined trait to this segment.
-
Select Audience Data in the top navigation and select Segments
-
Select Add New in the top left of the page to open the segment builder
-
Give your segment a friendly name and description, such as
Platform Web SDK - Homepage visitors
-
Select a Folder where your segment is saved in the pane to the right. You may want to create a folder by selecting the + icon next to an existing parent folder. You can name this new folder
Platform Web SDK tutorial
. -
Add an integration code, which in this case is a random set of numbers.
-
In the Data Source section, select Audience Manager and the data source you created earlier
-
Expand the Traits section and search for the trait that you created
-
Select Add Trait.
-
Select Save at the bottom of the page
Create a destination
Next, create a Cookie-based destination using the Destination Builder. The Destination Builder lets you create and manage cookie, URL, and server-to-server destinations.
-
Open the Destination Builder by selecting Destinations within the Audience Data menu in the top navigation
-
Select Create Destination
-
Enter a name and description,
Platform Web SDK tutorial
-
As the Category, select Custom
-
As the Type, select Cookie
-
Open the Configuration section to enter the details about your cookie destination
-
Give your cookie a friendly name,
platform_web_sdk_tutorial
-
As the Cookie Domain, add the domain of the site where you are planning for the integration, for the tutorial input the Luma domain,
luma.enablementadobe.com
-
As the Publish data to option, select Only the Selected domains
-
Select your domain if not already added
-
As the Data Format, select Single Key and give your cookie a key. For this tutorial use
segment
as the key value. -
Finally, select Save to save the destination configuration details.
-
In the Segment Mappings section, use the Search and Add Segments feature to search for your previously created
Platform Web SDK - Homepage visitors
and select Add. -
Once you add your segment, a pop-up opens where you must provide an expected value for your cookie. For this exercise, enter the value “hpvisitor”.
-
Select Save
-
Select Done
The segment-mapping period requires a few hours to be activated. Once completed, you can refresh the Audience Manager interface and see that the Mapped Segments list updated.
Validate the segment
A few hours after the initial creation of the segment, you can validate that it is working properly.
First, confirm that you can qualify for the segment
-
Open the with it mapped to your tag property to qualify for your newly created segment.
-
Open your browser’s developer tools > Network tab
-
Filter to the Platform Web SDK request using
interact
as the text filter -
Select a call and open the Preview tab to view the response details
-
Expand the payload to view the expected cookie details, as previously configured in Audience Manager. In this example, you will see the expected cookie name
platform_web_sdk_tutorial
. -
Open the Application tab, and open Cookies from the Storage menu.
-
Select the
https://luma.enablementadobe.com
domain and confirm that your cookie is written appropriately in the list
Finally, you should open the segment in the Audience Manager interface and ensure that the Segment Populations has incremented:
Now that you have completed this lesson, you should be able to see how the Platform Web SDK passes data to Audience Manager and can set a segment-specific first-party cookie with a cookie destination.