Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This article is prerelease documentation and is subject to change.]
Let Customer Insights - Data automatically create unknown profiles for unauthenticated visitors to your website and track their page views and interactions in real time. Set up web tracking, merge customers' unknown profiles with their known profiles when they authenticate on your site, and then personalize their web experience. Learn more in Real-time web personalization overview.
Prerequisites
Your website has a process for identifying known users and saving their customer data to a table. For example, a
<WebCustomers>table.You ingest your
<WebCustomers>table into Customer Insights - Data by using one of the data source connectors.You include your
<WebCustomers>table in the data unification process.
Set up web tracking
Sign in to Customer Insights - Data and select Web tracking & personalization.
Select your
<WebCustomers>table. The tracking script uses it to identify your customers when they authenticate.Select Copy to copy the tracking script, and then paste it in the
<head>tag of your website.If you're using a tag manager such as Google Tag Manager, go to the Google Tag Manager portal. Select Add new tag > Tag configuration > Custom HTML, paste the Customer Insights - Data tracking script, and then Save.
If you're using a Content Management System (CMS) such as Wordpress, your CMS provider should have an easy way to add a script to the site header. Here's an example from Wordpress: https://wordpress.com/support/adding-code-to-headers/.
Browse your website as an unauthenticated visitor to create an unknown profile in Customer Insights - Data.
To view the unknown profiles, go to the Customers page and select Unknown. All unknown profiles have a cookieId as an identifier, and the website interactions on the timeline are shown automatically.
To validate the web events in Dataverse, sign in to https://make.powerapps.com/. Select Tables > All, and then select the PersonalizationView and PersonalizationAction tables.
Authenticate unknown customers and merge them with known customers
To have Customer Insights - Data automatically merge an unknown profile with a known profile when a visitor authenticates, select the source table that you used to identify your customers when you set up web tracking. To identify and merge the profiles, the system needs to know the authenticated customer's unique ID. It gets this ID by calling the setUser function.
Sign in to Customer Insights - Data and select Web tracking & personalization.
Select the table that identifies your customers.
For example, the source table
LoyaltySignUpsin Customer Insights - Data usesLoyaltyIdas the primary key, which uniquely identifies a customer in that table.Only tables that you used as a source for data unification appear in the list of tables. Customer Insights - Data automatically identifies the visitor by using the primary key of the table that you select. The merge logic is the same as in the data unification process.
Define the
setUserfunction on your website. Typically, you only define this function on the page that authenticates visitors. The identifier is the visitor ID, such asjsmith001.<script> function setUser() { window["MSCI"].setUser({ "authId": "<identifier>" }); } </script>Call the
setUserfunction when a visitor authenticates.<button type="submit" onclick="setUser()">Submit</button>