CookiePro Implementation

Author:Aaron
Last Updated:November 01, 2021 3:53 PM

To add a CookiePro banner to an instance, follow the below steps:

  1. Confirm that the client has a CookiePro subscription and they have given NWSDataPrivacyAdmin access. 
    1. In Keepass under NWS > IT > Software Subscription, CookiePro - Admin Account use the credentials to log into the CookiePro portal.
    2. Under tenents, navigate to the client instance and click on Scripts in the left menu.
    3. Confirm that all scripts listed, have their "Test" scripts published. If, not click on each script and then the "Publish Test Script" option. Make sure to copy the ScriptID from this screen.
  2. Open the SDK and add the Data Privacy dependency to the SDK.config.json:
    1. {
            "internalName": "NWS.Titan.Modules.DataPrivacy",
            "minimumVersion": {
              "majorVersion": 7,
              "minorVersion": 0,
              "buildNumber": 1,
              "revision": 0
            },
            "maximumVersion": {
              "majorVersion": 8,
              "minorVersion": 0,
              "buildNumber": 0,
              "revision": 0
            }
          }
      }
      
  3. Update SDK page layouts to use CookiePro banner:
    1. Adding the using statement for the DataPrivacy Module:
    2. @using dp = NWS.Titan.Modules.DataPrivacy.UISupport
      
    3. Add the data privacy variable:
    4. var cookieConsentModule = Html.RenderCmsComponent(new dp.CookieConsentModule { ID = "cookieConsentModule", IncludeCookieSettingsbutton = false });
      
    5. Add the CookiePro banner to the end of the page layout:
    6. @cookieConsentModule
      
  4. Create a package and deploy to the dev site.
  5. Navigate to Titan Admin > Request Handling > DomainConfig
  6. Update the RequestDomain with the CookiePro parameter:
    1. <RegisteredDomain fqdn="[domain]" supportsHTTPS="1">
          <AlternateDomains>
            <AlternateDomain fqdn="[alternate domain]" />
          </AlternateDomains>
          <RootPath>/Titan-CMS.htm</RootPath>
          <RobotsTextContent>User-agent: * Disallow: /Views/Display/Blocks Disallow: /*?*PrintPage=yes*</RobotsTextContent>
          <Param Name="CookieProUID">[CookieProUI value from step 1c]-test append test in dev</Param>
        </RegisteredDomain>
      
top