7

Now that we use Microservices, I would like to understand where to configure claims forwarding for Footprints. Like in similar questions asked prior to Web 8, I have Experience Optimization with a simple targeting rule which I would like to trigger based on XPM Footprint overwrites. For instance setting the Session Length to 5 min to see the promotional content. So far none of my footprints are overwriting the context.

I added the footprint cartridge in the context microservice, configured it in cd_ambient_conf.xml, as well as whitelisted all IPs (this is for a demo server), enabled all claims in GloballyAcceptedClaims. Enabled TAFContext cookie, and the ClaimStore .Net processor, just in case.

ADF is configured ok in the DXA 1.5 staging site, claims are set correctly and I can trigger XO promotions via XPM Persona just fine, as well as through browsing behavior and device detection. Only Footprints do not work.

SmartTarget.xml has the right prefixes setup. trigger_types.xml has the right triggers, I verified the prefix and claims names there, and made sure they correspond to the config in SiteEdit Editor.

I configured the context engine claims forwarding in cd_ambient_conf.xml also, by adding taf:request:headers and taf:request:full_url in the ForwardedClaims element:

<ForwardedClaims>
  <Claim Uri="taf:request:headers" />
  <Claim Uri="taf:request:full_url" />
</ForwardedClaims>

Do I need the same ADF config on the context service in the DXA site (last time I tried, the site was not loading), and on the XO query microservice? Should Cartridges be installed and configured in staging site and XO microservice also?

Here is cd_ambient_conf.xml in the Context microservice:

  <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <Configuration Version="8.1"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:noNamespaceSchemaLocation="schemas/cd_ambient_conf.xsd">
<Security OAuthEnabled="false">
    <RequestValidator>com.sdl.web.oauth.validator.OAuth2RequestValidator</RequestValidator>

    <!--Ambient data framework claims forwarding is enabled for the requests coming from white listed IP addresses.-->
    <WhiteList>
        <IPAddresses>
            <Ip>0.0.0.0-255.0.0.0</Ip>
            <Ip>127.0.0.1</Ip>
        </IPAddresses>
    </WhiteList>
    <GloballyAcceptedClaims>
        <Claim Uri="taf:session:preview:preview_session"/>
        <Claim Uri="taf:claim:ambientdata:sessioncartridge:useragent:browser"/>
        <Claim Uri="taf:claim:ambientdata:footprintcartridge:acceptlanguage"/>
        <Claim Uri="taf:claim:ambientdata:footprintcartridge:recurringvisitor"/>
        <Claim Uri="taf:claim:ambientdata:sessioncartridge:useragent:os"/>
        <Claim Uri="taf:claim:ambientdata:footprintcartridge:searchquery"/>
        <Claim Uri="taf:claim:ambientdata:sessioncartridge:session:lifetime"/>
        <Claim Uri="taf:claim:ambientdata:sessioncartridge:refererdomain"/>

     <Claim Uri="taf:claim:context:date" />
     <Claim Uri="taf:claim:geolocation:coords" />
     <Claim Uri="taf:claim:geolocation:city" />
     <Claim Uri="taf:claim:geolocation:country" />
     <Claim Uri="taf:claim:geolocation:instore" />
     <Claim Uri="taf:claim:geolocation:weather:current" />
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:gender" />
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:age" />         
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:customer_value_code" />
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:offer_category" />
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:journey_segment" />        
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:customer_segment" />              
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:customer_order_total" />
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:customer_value_score" />
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:customer_wealth" />
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:days_since_last_order" />
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:spend_change" />
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:social_reach" />
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:flickr_id" />
     <Claim Uri="taf:claim:segmentation:segment" />
     <Claim Uri="taf:claim:context:device:displayHeight" />
     <Claim Uri="taf:claim:context:device:displayWidth" />
     <Claim Uri="taf:claim:context:device:inputDevices" />
     <Claim Uri="taf:claim:context:device:mobile" />
     <Claim Uri="taf:claim:context:device:model" />
     <Claim Uri="taf:claim:context:device:orientation" />
     <Claim Uri="taf:claim:context:device:pixelDensity" />
     <Claim Uri="taf:claim:context:device:pixelRatio" />
     <Claim Uri="taf:claim:context:device:tablet" />
     <Claim Uri="taf:claim:context:device:vendor" />    

    <Claim Uri="taf:request:headers" />
    <Claim Uri="taf:request:full_url" />
    </GloballyAcceptedClaims>


    <!-- Built-in authentication server's configuration. -->
    <AuthenticationServer>
        <SharedSecret>sample_passphrase</SharedSecret>
    </AuthenticationServer>

    <!-- Rules definition for read/write shielding of services. -->
    <Rules Enabled="false"/>
</Security>
<!-- Excluded Paths -->

<ExcludedPaths>
    <!--
       <Path>/token.svc</Path>
    -->
</ExcludedPaths>
<Cartridges>

    <Cartridge File="cd_webservice_preview_cartridge.xml" Category="SYSTEM"/>
    <Cartridge File="cd_webservice_preview_cartridge.xml"/>
    <Cartridge File="session_cartridge_conf.xml" />
    <Cartridge File="smarttarget_cartridge_conf.xml" />     
    <Cartridge File="defaultclaims_cartridge_conf.xml" />
    <Cartridge File="audiencemanager_cartridge_conf.xml" />             

    <Cartridge File="cwd_engine_cartridge_conf.xml"/>
    <Cartridge File="cx_ambient_cartridge.xml" />


    <Cartridge File="footprint_cartridge_conf.xml"/>


</Cartridges>

<!-- Cookies settings -->

  <Cookies>        
      <Cookie Type="ADF" Name="TAFContext" />
  </Cookies>


<!-- The claim store provider that will be used. -->
<!-- For Java -->
<!--<ClaimStoreProvider>com.tridion.ambientdata.claimstore.providers.JavaClaimStoreProvider</ClaimStoreProvider>-->
<!-- For .NET -->
<ClaimStoreProvider>com.tridion.ambientdata.claimstore.providers.DotNetClaimStoreProvider</ClaimStoreProvider>

4

Ok apparently we need claims to be declared both in the <ForwardedClaims> and <GloballyAcceptedClaims> in the staging site's cd_ambient_conf.xml.

Here is a working config file:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Configuration Version="8.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../schemas/cd_ambient_conf.xsd">


<ExcludedPaths>
<!-- commented to enable preview of new images
       <Path>/media</Path>
       -->
<Path>/content</Path>
<Path>/Content</Path>
<Path>/system</Path>
</ExcludedPaths>

 <ForwardedClaims CookieName="TAFContext">
    <Claim Uri="taf:session:preview:preview_session"/>
    <Claim Uri="taf:claim:ambientdata:sessioncartridge:useragent:browser"/>
    <Claim Uri="taf:claim:ambientdata:footprintcartridge:acceptlanguage"/>
    <Claim Uri="taf:claim:ambientdata:footprintcartridge:recurringvisitor"/>
    <Claim Uri="taf:claim:ambientdata:sessioncartridge:useragent:os"/>
    <Claim Uri="taf:claim:ambientdata:footprintcartridge:searchquery"/>
    <Claim Uri="taf:claim:ambientdata:sessioncartridge:session:lifetime"/>
    <Claim Uri="taf:claim:ambientdata:sessioncartridge:refererdomain"/>

     <Claim Uri="taf:claim:context:date" />
     <Claim Uri="taf:claim:geolocation:coords" />
     <Claim Uri="taf:claim:geolocation:city" />
     <Claim Uri="taf:claim:geolocation:country" />
     <Claim Uri="taf:claim:geolocation:instore" />
     <Claim Uri="taf:claim:geolocation:weather:current" />
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:gender" />
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:age" />               
     <Claim Uri="taf:claim:segmentation:segment" />
     <Claim Uri="taf:claim:socialchannel:preferred" />
     <Claim Uri="taf:claim:context:device:displayHeight" />
     <Claim Uri="taf:claim:context:device:displayWidth" />
     <Claim Uri="taf:claim:context:device:inputDevices" />
     <Claim Uri="taf:claim:context:device:mobile" />
     <Claim Uri="taf:claim:context:device:model" />
     <Claim Uri="taf:claim:context:device:orientation" />
     <Claim Uri="taf:claim:context:device:pixelDensity" />
     <Claim Uri="taf:claim:context:device:pixelRatio" />
     <Claim Uri="taf:claim:context:device:tablet" />
     <Claim Uri="taf:claim:context:device:vendor" />        

    <Claim Uri="taf:request:cookies" /> 
    <Claim Uri="taf:request:headers" />
    <Claim Uri="taf:request:full_url" />
 </ForwardedClaims>

 <Security>
  <GloballyAcceptedClaims CookieName="TAFContext">
    <Claim Uri="taf:session:preview:preview_session"/>
    <Claim Uri="taf:claim:ambientdata:sessioncartridge:useragent:browser"/>
    <Claim Uri="taf:claim:ambientdata:footprintcartridge:acceptlanguage"/>
    <Claim Uri="taf:claim:ambientdata:footprintcartridge:recurringvisitor"/>
    <Claim Uri="taf:claim:ambientdata:sessioncartridge:useragent:os"/>
    <Claim Uri="taf:claim:ambientdata:footprintcartridge:searchquery"/>
    <Claim Uri="taf:claim:ambientdata:sessioncartridge:session:lifetime"/>
    <Claim Uri="taf:claim:ambientdata:sessioncartridge:refererdomain"/>

     <Claim Uri="taf:claim:context:date" />
     <Claim Uri="taf:claim:geolocation:coords" />
     <Claim Uri="taf:claim:geolocation:city" />
     <Claim Uri="taf:claim:geolocation:country" />
     <Claim Uri="taf:claim:geolocation:instore" />
     <Claim Uri="taf:claim:geolocation:weather:current" />
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:gender" />
     <Claim Uri="taf:claim:audiencemanager:contact:extendeddetail:age" />                  
     <Claim Uri="taf:claim:segmentation:segment" />
     <Claim Uri="taf:claim:socialchannel:preferred" />
     <Claim Uri="taf:claim:context:device:displayHeight" />
     <Claim Uri="taf:claim:context:device:displayWidth" />
     <Claim Uri="taf:claim:context:device:inputDevices" />
     <Claim Uri="taf:claim:context:device:mobile" />
     <Claim Uri="taf:claim:context:device:model" />
     <Claim Uri="taf:claim:context:device:orientation" />
     <Claim Uri="taf:claim:context:device:pixelDensity" />
     <Claim Uri="taf:claim:context:device:pixelRatio" />
     <Claim Uri="taf:claim:context:device:tablet" />
     <Claim Uri="taf:claim:context:device:vendor" />        

    <Claim Uri="taf:request:cookies" /> 
    <Claim Uri="taf:request:headers" />
    <Claim Uri="taf:request:full_url" />
</GloballyAcceptedClaims>
</Security>

<!-- Cookies settings -->
<Cookies>
     <!-- <CookieClaim DefaultValue="true" Name="CookieClaim"/>
      <Cookie Type="Tracking" Name="myTrackingCookie" Path="/"/>
      <Cookie Type="Session" Name="mySessionCookie" Path="/"/>-->
      <Cookie Type="ADF" Name="TAFContext" />
  </Cookies>

  <!-- The claim store provider that will be used. -->
  <!-- For Java -->
  <!--              <ClaimStoreProvider>com.tridion.ambientdata.claimstore.providers.JavaClaimStoreProvider</ClaimStoreProvider>-->
<!-- For .NET -->
    <ClaimStoreProvider>com.tridion.ambientdata.claimstore.providers.DotNetClaimStoreProvider</ClaimStoreProvider>
</Configuration>

For footprints to work you also need the right IP range whitelisted, and enable the footprint cartridge in the Content microservice's cd_ambient_conf.xml

| improve this answer | |
2

There are basically two parts to the forwarding of claims: the client needs to know which claims to attempt to forward (ForwardedClaims section) and the server needs to know which claims to accept (GloballyAcceptedClaims section). And of course some more supporting configuration such as the whitelist for IP ranges.

It looks like you have configured the GloballyAcceptedClaims section correctly on the 'server' (context service), but you are missing the ForwardedClaims section on the 'client' (your website). If you add the claims in there, the forwarding should start working.

| improve this answer | |
  • I had the forwardedclaims on the website but was missing them also in globalacceptedclaims – Philippe Conil Sep 29 '16 at 11:26
  • If you were missing them in the service, that's fine. But I don't believe you need that section on your website. – Peter Kjaer Sep 29 '16 at 12:11
  • I know it sounds odd, but I just tested again, if I remove the GloballyAcceptedClaims from the staging site, claims forwarding stops working. Paul A. from R&D actually made the config change for me to fix the issue. – Philippe Conil Sep 30 '16 at 7:54
  • That IS odd -- I've never had to do that to get it working. – Peter Kjaer Sep 30 '16 at 8:03
  • in Web8 or prior? – Philippe Conil Sep 30 '16 at 8:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.