Usercentrics - PUBLIC

In my data privacy policy, how can I jump directly to a data processing service that the user has selected?

We offer a link to further information about each data processing service and category in our Privacy Settings Modal:

 

Clicking it automatically adds a query parameter to the URL that’ll be opened.

The query parameter looks like this: ?ucId=…

→ for data processing services, the template ID will be added (e.g. ?ucId=BJ59EidsWQ)

→ for categories, the category name will be added (e.g. ?ucId=functional)

 
The URL to your data privacy policy is set up in your Usercentrics Admin Interface in section “Appearance” → “Privacy Settings” → “Consent Information” → “Link to Custom Website”.

 If you’re using our

Nutzen Sie in Ihrer Datenschutzerklärung die HTML Embeddings, you can add the following code in the <head> section of your website. This will open the page directly at the height of the data processing service or category that a user has clicked in our CMP:

<script> function getQueryParam(key) { var query = window.location.href.substring( window.location.href.indexOf("?") + 1 ); var params = query.split("&"); for (var i = 0; i < params.length; i++) { var pos = params[i].indexOf("="); if ( params[i].substring(0, pos) === key ) { return params[i].substring(pos + 1); } } return ''; } function loadFunction() { console.log("app initialized"); var ucId = getQueryParam('ucId'); var domElement = document.getElementById('toggle-consent-' + ucId); if (domElement) { domElement.scrollIntoView(true); } } function addJS() { window["usercentrics"] = window["usercentrics"] || {}; if (window["usercentrics"].isInitialized) { loadFunction(); } else { window["usercentrics"].onViewInit = function () { loadFunction(); } } } addJS(); </script>

 

If you are not using the Usercentrics HTML Embeddings, just change line 21 and point to the HTML element that you have inserted in your data privacy policy. You can still use the query parameter ?ucId :

var domElement = document.getElementById('my-custom-html-id-' + ucId);

→ Please replace ‘my-custom-html-id-’ with the ID of the HTML element that you would like to point to.

 

Do you need further help?

https://usercentrics.atlassian.net/wiki/spaces/SKB/pages/234913848

Usercentrics - PUBLIC