Edit

Share via


Personalize messages, make journey decisions based on web interactions

Note

  • This feature applies to known contacts or leads, such as those who have visited a webpage through a tracking link in a Customer Insights - Journeys email or submitted a Customer Insights - Journeys form on a website. Therefore any anonymous web interactions such as visits, clicks, and anonymous web form traffic aren't supported and won't be surfaced in the out-of-the-box analytics.
  • To enable web tracking in Customer Insights - Journeys forms, enable the Web Tracking setting in Forms > Form settings > General.

In Customer Insights - Journeys, you can track and leverage your customers’ online behavior to deliver personalized experiences across digital channels. For example, you can boost conversions and customer loyalty by sending tailored offers after customers visit your website and show interest in a product or service. By tracking additional data about customers' online journeys, you can gain valuable insights into your customers' preferences and needs and easily measure your campaign’s effectiveness.

Web tracking helps you learn about website usage by capturing:

  • Website visits: Captured every time a known customer goes to a page on your website.
  • Website link clicks: Captured every time a known customer selects a link, like a banner on your website.

Set up web tracking

To enable web tracking, add JavaScript code generated by Customer Insights - Journeys to each website you want to track. The JavaScript code uses cookies to record each page that a browser requests from your website. Learn more in How the real-time journeys app uses cookies.

Important

The website tracking script supplied by this feature tries to set a cookie for all visitors to your site. If your site lets visitors opt out of cookies, the website tracking script still tries to set its cookie even for visitors who opt out. To fully respect the opt-out preference of your site visitors, modify the website tracking script so it works with your site's opt-out mechanism.

Tip

Many countries and regions, including the European Union, require you to get consent before setting a cookie on a user's device. It's your organization's responsibility to know and follow all relevant laws and regulations in the markets where you operate, including consent to set cookies. Read more about EU regulations in Cookies and similar technologies. Learn more about cookies in real-time journeys in How the real-time journeys app uses cookies.

To set up web tracking:

  1. Go to Settings.

  2. Go to Web Tracking under the Customer Engagement section in the menu. This is the tracking script you place on your website to track it. It's read-only.

    Screenshot of tracking script to copy.

  3. Copy the JavaScript code (make sure to select all of it) and place it in the <head> tag of your website. Check that you don't already have a script set up for your site.

    • If you're using Power Pages, go to the Portal Management app. Go to Content > Web Templates > Header, paste the Customer Insights - Journeys tracking script, and then select Save.
    • If you're using a tag manager like Google Tag Manager, go to the Google Tag Manager portal. Select Add new tag > Tag configuration > Custom HTML, paste the Customer Insights - Journeys tracking script, and then select Save. You also need to choose when this triggers (for example, "All Pages"). When you're done, select Submit to publish your changes.
    • If you're using another content management system (CMS) like Wordpress, your CMS provider should have a way to add a script to the site header. Here's an example from Wordpress: Add Code to Headers.

Conditions needed for web tracking to work

For Web Tracking to work, make sure the following conditions are met:

  1. Add the web tracking script to the header of the website or pages you want to track.
  2. Make sure the customer's first visit to your website comes from selecting a Customer Insights – Journeys link, like an email link that directs the customer to your website.
  3. Enable link tracking for your URL.
  4. Make sure the customer (for example, contact) has Allow Tracking enabled. Learn more about how to manage consent for tracking: Consent to track user behavior.

How does web tracking work

  • After a customer visits your website using a Customer Insights - Journeys originated link, the web tracking script creates a cookie named msdynci_trackingContext for the customer.
  • If the customer doesn’t explicitly remove the cookie, the cookie is available in the customer's future visits even if they didn't go to your website from a Customer Insights - Journeys link.
  • Customer interactions like "web site visited" and "link clicked" are tracked and available in your customer's (for example, contact) insights tab and on the timeline.
  • If any of the conditions in the section above aren't met (for example, you disabled link tracking or your customer consent record doesn’t allow tracking), the web interactions aren't tracked or available even if the web tracking link is present and the customer visited your website from a Customer Insights - Journeys link.

Important

Going to your website once from a Customer Insights - Journeys link is enough for tracking. All future visits and clicks are tracked automatically even if the customer doesn't go to your website from a Customer Insights - Journeys link, unless the customer deletes the cookie manually.

Web tracking and forms web tracking

Customer Insights - Journeys forms have a toggle to let web tracking. The toggle is disabled by default, and you need to enable it for form web tracking to work. For web tracking to work, your customer needs to go to your website through a Customer Insights - Journeys link at least once so a cookie can be created for future visits and interactions.

A benefit of forms web tracking is that if your customer submits a form, even without going to your website through a Customer Insights - Journeys link, the form submission creates a cookie named msdynmkt_formsubmissionid. This cookie lets the web tracking script track your customer's future website visits and interactions.

Important

You must add the web tracking script to your website for form web tracking to work.

Personalize customer experiences based on web interaction

Use web interactions to create personalized customer experiences in these ways:

  • Use as triggers to start a real-time journey for known contacts or leads.

    Screenshot of using a web interaction as a trigger.

  • Use in an if/then branch to respond to customer website actions.

    Screenshot of using a web interaction in an if/then branch.

In both cases, define conditions based on webpage URL, webpage title, and other properties to personalize the experience for specific web actions, like viewing the shopping cart. Here are some examples:

  • Page URL (msdynci_viewuri): The URL of the visited page (for example, https://www.contoso.com/home).
  • Page name (msdynci_viewname): The name of the visited page (for example, "home.html").
  • Page title (msdynci_viewtitle): The title of the visited page (for example, "Home").
  • View type (msdynci_viewtype): The type of the visited page (for example, "page").
  • Previous page name (msdynci_viewpreviousviews): The URL of the previously visited page for the session (for example, https://www.contoso.com).
  • Action type (msdynci_actiontype): The type of user interaction captured during a web interaction (for example, LClick). Possible values:
    • leftClick: "LClick"
    • rightClick: "RClick"
    • middleClick: "MClick"
    • keyboardEnter: "KEnter"
    • keyboardSpace: "KSpace"
  • Action is outbound (msdynci_actionisoutbound): Whether the user’s click leads to a destination outside the current domain (for example, false).
  • Click coordinates (msdynci_clickcoordinates): The exact click location on the webpage (for example, 23456).