(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4561],{8767:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/advanced/services",function(){return s(378)}])},378:function(e,n,s){"use strict";s.r(n),s.d(n,{__toc:function(){return l}});var o=s(5893),t=s(2673),i=s(7913),r=s(2702);s(9128);var a=s(2643);let l=[{depth:2,value:"YouTube",id:"youtube"},{depth:2,value:"Vimeo",id:"vimeo"},{depth:2,value:"Facebook Pixel",id:"facebook-pixel"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",h2:"h2",p:"p",pre:"pre",code:"code",span:"span",strong:"strong"},(0,a.a)(),e.components);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{children:"External services"}),"\n",(0,o.jsx)(n.h2,{id:"youtube",children:"YouTube"}),"\n",(0,o.jsx)(n.p,{children:'You can ensure that YouTube videos respect user consents from CookieHub by using the "data-consent" attribute for iframes, similar to how you would with script tags. In addition to adding the "data-consent" attribute, you\'ll need to change the "src" attribute to "data-src." This way, the YouTube video will only load if the user has provided their consent.'}),"\n",(0,o.jsx)(n.p,{children:"Here's an example:"}),"\n",(0,o.jsx)(n.pre,{"data-language":"html","data-theme":"default",children:(0,o.jsx)(n.code,{"data-language":"html","data-theme":"default",children:(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"iframe"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"data-consent"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"analytics"'}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"data-src"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://www.youtube.com/embed/NHEaYbDWyQE"'}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"frameborder"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"0"'}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"width"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"560"'}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"height"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"315"'}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"allowfullscreen"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"></"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"iframe"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]})})}),"\n",(0,o.jsx)(n.p,{children:'In this example, the "data-consent" attribute is set to "analytics," indicating that the video is related to analytics. This ensures that the video will only load if the user has consented to the "analytics" category through CookieHub. By making this adjustment, you can respect user consents and maintain compliance with data privacy regulations while embedding YouTube videos on your website.'}),"\n",(0,o.jsx)(n.h2,{id:"vimeo",children:"Vimeo"}),"\n",(0,o.jsx)(n.p,{children:'When embedding videos from Vimeo, users can enhance the functionality of the Vimeo player by appending various URL parameters to the end of the player\'s URL. One of these parameters is "dnt," which stands for "Do Not Track." Enabling this option prevents the player from tracking any session data, including cookies and analytics.'}),"\n",(0,o.jsx)(n.p,{children:'To activate the "Do Not Track" setting on your Vimeo embed video, simply add "?dnt=true" to the end of the URL within the "src" attribute:'}),"\n",(0,o.jsx)(n.pre,{"data-language":"html","data-theme":"default",children:(0,o.jsx)(n.code,{"data-language":"html","data-theme":"default",children:(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"iframe"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://player.vimeo.com/video/76979871?dnt=true"'}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"width"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"640"'}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"height"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"360"'}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"></"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"iframe"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]})})}),"\n",(0,o.jsx)(n.p,{children:'If you already have other parameters enabled, replace the "?" with "&" to ensure proper URL formatting:'}),"\n",(0,o.jsx)(n.pre,{"data-language":"html","data-theme":"default",children:(0,o.jsx)(n.code,{"data-language":"html","data-theme":"default",children:(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"iframe"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://player.vimeo.com/video/76979871?embedparameter=value&dnt=true"'}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"width"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"640"'}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"height"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"360"'}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"></"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"iframe"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]})})}),"\n",(0,o.jsx)(n.p,{children:"By using this method, you can control the tracking preferences for your Vimeo embedded videos, aligning them with your data privacy and user experience goals."}),"\n",(0,o.jsx)(n.h2,{id:"facebook-pixel",children:"Facebook Pixel"}),"\n",(0,o.jsx)(n.p,{children:"Facebook Pixel provides methods to enable or disable consent mode based on user preferences regarding specific cookie categories. The default implementation for this feature is not set, as the appropriate cookie category can vary depending on how you use Facebook Pixel on your website. However, it's relatively straightforward to implement this functionality with a few modifications to your existing code."}),"\n",(0,o.jsx)(n.p,{children:"Here's a step-by-step guide on how to implement Facebook Pixel consent mode with CookieHub:"}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Update Your Facebook Pixel Code"})}),"\n",(0,o.jsx)(n.p,{children:"Add the fbq('consent'...) line to your Facebook Pixel code just before the init method. This line sets the consent mode to either 'grant' or 'revoke' based on the user's choice. Here's an example of how to do it:"}),"\n",(0,o.jsx)(n.pre,{"data-language":"html","data-theme":"default",children:(0,o.jsxs)(n.code,{"data-language":"html","data-theme":"default",children:[(0,o.jsx)(n.span,{className:"line",children:(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"<!-- Facebook Pixel Code -->"})}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"script"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"!function"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(f"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"b"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"e"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"v"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"n"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"t"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"s)"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"{"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"f"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".fbq)"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:";n"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"f"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"fbq"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=function"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(){"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"n"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".callMethod"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"?"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"n"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"callMethod"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".apply"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(n"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"arguments)"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"n"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"queue"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".push"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(arguments)};"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"!"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"f"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"._fbq)"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"f"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"._fbq"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"n;"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"n"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".push"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"n;"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"n"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".loaded"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=!"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:";"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"n"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".version"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'2.0'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"n"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".queue"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"[];t"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"b"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".createElement"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(e);"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"t"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".async"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=!"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"t"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:".src"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"v;s"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"b"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".getElementsByTagName"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(e)["}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"];"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"s"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-constant)"},children:"parentNode"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:".insertBefore"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(t"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"s)}(window"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" document"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'script'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'https://connect.facebook.net/en_US/fbevents.js'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:" "}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"fbq"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'consent'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'revoke'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"); "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"// Set the default consent to 'revoke'"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"fbq"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'init'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'xxxxxxxxxxxxxxxxxxx'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"); "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"// Your Pixel ID"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"fbq"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'track'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'PageView'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"</"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"script"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"<!-- End Facebook Pixel Code -->"})})]})}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Modify Your CookieHub Implementation"})}),"\n",(0,o.jsx)(n.p,{children:"Update your CookieHub implementation code to include triggers for the onAllow and onRevoke events. These triggers will change the consent mode in Facebook Pixel when users make choices regarding specific cookie categories."}),"\n",(0,o.jsx)(n.p,{children:"Here's an example of how to do it:"}),"\n",(0,o.jsx)(n.pre,{"data-language":"javascript","data-theme":"default",children:(0,o.jsxs)(n.code,{"data-language":"javascript","data-theme":"default",children:[(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"var"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" cpm "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onAllow"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(category) {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (category "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'marketing'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"fbq"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'consent'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'grant'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"); "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"// Set consent to 'grant' for marketing category"})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"onRevoke"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"(category) {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"if"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" (category "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-keyword)"},children:"=="}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'marketing'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,o.jsxs)(n.span,{className:"line",children:[(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"fbq"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'consent'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'revoke'"}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"); "}),(0,o.jsx)(n.span,{style:{color:"var(--shiki-token-comment)"},children:"// Set consent to 'revoke' for marketing category"})]}),"\n",(0,o.jsx)(n.span,{className:"line",children:(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,o.jsx)(n.span,{className:"line",children:(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" }"})}),"\n",(0,o.jsx)(n.span,{className:"line",children:(0,o.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"};"})})]})}),"\n",(0,o.jsx)(n.p,{children:"In this example, we've set up Facebook Pixel to respond to the user's choices in the \"marketing\" category. If you wish to use the \"analytics\" category instead, simply replace 'marketing' with 'analytics' in both the onAllow and onRevoke sections."}),"\n",(0,o.jsx)(n.p,{children:"By following these steps, you can ensure that Facebook Pixel's consent mode aligns with your users' preferences, allowing you to maintain compliance with data privacy regulations and offer a more personalized experience on your website."})]})}let c={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.a)(),e.components);return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/advanced/services.mdx",route:"/advanced/services",timestamp:1721839578e3,pageMap:[{kind:"Meta",data:{index:{title:"Home",type:"page",display:"hidden"},"getting-started":{title:"Getting started",type:"page"},features:{title:"Features",type:"page"},installation:{title:"Installation",type:"page"},dashboard:{title:"Dashboard",type:"page"},advanced:{title:"Advanced",type:"page"}}},{kind:"Folder",name:"advanced",route:"/advanced",children:[{kind:"Meta",data:{index:"Introduction","google-tag-manager":"Google Tag Manager","consent-mode-v2-signals":"Consent mode v2 signals","javascript-api":"Javascript API",services:"External services",csp:"Content Security Policy (CSP)","known-issues":"Known issues & workarounds"}},{kind:"MdxPage",name:"consent-mode-v2-signals",route:"/advanced/consent-mode-v2-signals"},{kind:"MdxPage",name:"csp",route:"/advanced/csp"},{kind:"MdxPage",name:"google-tag-manager",route:"/advanced/google-tag-manager"},{kind:"MdxPage",name:"index",route:"/advanced"},{kind:"MdxPage",name:"javascript-api",route:"/advanced/javascript-api"},{kind:"MdxPage",name:"known-issues",route:"/advanced/known-issues"},{kind:"MdxPage",name:"services",route:"/advanced/services"}]},{kind:"Folder",name:"dashboard",route:"/dashboard",children:[{kind:"Meta",data:{index:"Getting started",authentication:"Authentication",account:"Account",vendors:"Vendors",services:"Services",billing:"Billing","---":{type:"separator",title:"Domains"},"domain-overview":"Overview","add-domain":"Add domain","domain-settings":"Domain settings",implementation:"Implementation",customization:"Customization",languages:"Languages & Translations",regions:"Regions & Policy frameworks","cookie-management":"Cookie management",scans:"Scans","consent-log":"Consent log",reports:"Reports"}},{kind:"MdxPage",name:"account",route:"/dashboard/account"},{kind:"MdxPage",name:"add-domain",route:"/dashboard/add-domain"},{kind:"MdxPage",name:"authentication",route:"/dashboard/authentication"},{kind:"MdxPage",name:"billing",route:"/dashboard/billing"},{kind:"MdxPage",name:"consent-log",route:"/dashboard/consent-log"},{kind:"MdxPage",name:"cookie-management",route:"/dashboard/cookie-management"},{kind:"MdxPage",name:"customization",route:"/dashboard/customization"},{kind:"MdxPage",name:"domain-overview",route:"/dashboard/domain-overview"},{kind:"MdxPage",name:"domain-settings",route:"/dashboard/domain-settings"},{kind:"MdxPage",name:"implementation",route:"/dashboard/implementation"},{kind:"MdxPage",name:"index",route:"/dashboard"},{kind:"MdxPage",name:"languages",route:"/dashboard/languages"},{kind:"MdxPage",name:"regions",route:"/dashboard/regions"},{kind:"MdxPage",name:"reports",route:"/dashboard/reports"},{kind:"MdxPage",name:"scans",route:"/dashboard/scans"},{kind:"MdxPage",name:"services",route:"/dashboard/services"},{kind:"MdxPage",name:"vendors",route:"/dashboard/vendors"}]},{kind:"Folder",name:"features",route:"/features",children:[{kind:"Meta",data:{index:"Introduction","cookie-scanner":"Cookie scanner","cookie-declaration":"Cookie declaration","automatic-cookie-blocker":"Automatic cookie blocker",regions:"Regions / Geo-targeting",languages:"Languages & translations","policy-frameworks":"Policy frameworks","consent-log":"Consent log",accessibility:"Accessibility",linker:"Linker",reports:"Reports","---":{type:"separator",title:"Integrations"},"google-tag-manager":"Google Tag Manager","google-consent-mode":"Consent mode","shopify-customer-privacy":"Shopify Customer Privacy API","iab-tcf":"IAB Transparency and Consent Framework (TCF)","google-additional-consent-mode":"Google Additional Consent Mode","iab-us-privacy":"IAB US Privacy (CCPA)","global-privacy-control":"Global Privacy Control"}},{kind:"MdxPage",name:"accessibility",route:"/features/accessibility"},{kind:"MdxPage",name:"automatic-cookie-blocker",route:"/features/automatic-cookie-blocker"},{kind:"MdxPage",name:"consent-log",route:"/features/consent-log"},{kind:"MdxPage",name:"cookie-declaration",route:"/features/cookie-declaration"},{kind:"MdxPage",name:"cookie-scanner",route:"/features/cookie-scanner"},{kind:"MdxPage",name:"global-privacy-control",route:"/features/global-privacy-control"},{kind:"MdxPage",name:"google-additional-consent-mode",route:"/features/google-additional-consent-mode"},{kind:"MdxPage",name:"google-consent-mode",route:"/features/google-consent-mode"},{kind:"MdxPage",name:"google-tag-manager",route:"/features/google-tag-manager"},{kind:"MdxPage",name:"iab-tcf",route:"/features/iab-tcf"},{kind:"MdxPage",name:"iab-us-privacy",route:"/features/iab-us-privacy"},{kind:"MdxPage",name:"index",route:"/features"},{kind:"MdxPage",name:"languages",route:"/features/languages"},{kind:"MdxPage",name:"linker",route:"/features/linker"},{kind:"MdxPage",name:"policy-frameworks",route:"/features/policy-frameworks"},{kind:"MdxPage",name:"regions",route:"/features/regions"},{kind:"MdxPage",name:"reports",route:"/features/reports"},{kind:"MdxPage",name:"shopify-customer-privacy",route:"/features/shopify-customer-privacy"}]},{kind:"Folder",name:"getting-started",route:"/getting-started",children:[{kind:"Meta",data:{index:"Introduction","cookie-categories":"Cookie categories","subscriptions-and-pricing":"Subscriptions & pricing","resellers-affiliates":"Reseller & affiliates","data-processing-and-security":"Data Processing & Security",faq:"FAQ",support:"Support","change-log":"Change log","release-notes":"Release notes"}},{kind:"MdxPage",name:"change-log",route:"/getting-started/change-log"},{kind:"MdxPage",name:"cookie-categories",route:"/getting-started/cookie-categories"},{kind:"MdxPage",name:"data-processing-and-security",route:"/getting-started/data-processing-and-security"},{kind:"MdxPage",name:"faq",route:"/getting-started/faq"},{kind:"MdxPage",name:"index",route:"/getting-started"},{kind:"Folder",name:"release-notes",route:"/getting-started/release-notes",children:[{kind:"MdxPage",name:"cookiehub-2.7",route:"/getting-started/release-notes/cookiehub-2.7"},{kind:"Meta",data:{"cookiehub-2.7":"Cookiehub 2.7"}}]},{kind:"MdxPage",name:"resellers-affiliates",route:"/getting-started/resellers-affiliates"},{kind:"MdxPage",name:"subscriptions-and-pricing",route:"/getting-started/subscriptions-and-pricing"},{kind:"MdxPage",name:"support",route:"/getting-started/support",frontMatter:{title:"Support",sidebar_position:200}}]},{kind:"MdxPage",name:"index",route:"/"},{kind:"Folder",name:"installation",route:"/installation",children:[{kind:"Meta",data:{index:"Getting started","upgrade-v2.8":"Upgrade guide","consent-mode-v2":"Consent mode","-":{type:"separator",title:"Tag installation"},tag:"Installation","content-management-systems":"Content Management Systems",wordpress:"Wordpress",matomo:"Matomo Tag Manager",troubleshooting:"Troubleshooting","---":{type:"separator",title:"Google Tag Manager"},"google-tag-manager":"Installation","google-tag-manager-upgrade":"Upgrade","additional-consent":"Additional consent","consent-overview":"Consent overview","----":{type:"separator",title:"Digging deeper"},"conditional-html-tags":"Conditional HTML tags","cookie-declaration":"Cookie declaration","resurface-dialog":"Resurface dialog",linker:"Linker"}},{kind:"MdxPage",name:"additional-consent",route:"/installation/additional-consent"},{kind:"MdxPage",name:"conditional-html-tags",route:"/installation/conditional-html-tags"},{kind:"MdxPage",name:"consent-mode-v2",route:"/installation/consent-mode-v2"},{kind:"MdxPage",name:"consent-overview",route:"/installation/consent-overview"},{kind:"MdxPage",name:"content-management-systems",route:"/installation/content-management-systems"},{kind:"MdxPage",name:"cookie-declaration",route:"/installation/cookie-declaration"},{kind:"MdxPage",name:"google-tag-manager-upgrade",route:"/installation/google-tag-manager-upgrade"},{kind:"MdxPage",name:"google-tag-manager",route:"/installation/google-tag-manager"},{kind:"MdxPage",name:"index",route:"/installation"},{kind:"MdxPage",name:"linker",route:"/installation/linker"},{kind:"MdxPage",name:"matomo",route:"/installation/matomo"},{kind:"MdxPage",name:"resurface-dialog",route:"/installation/resurface-dialog"},{kind:"MdxPage",name:"tag",route:"/installation/tag"},{kind:"MdxPage",name:"troubleshooting",route:"/installation/troubleshooting"},{kind:"MdxPage",name:"upgrade-v2.8",route:"/installation/upgrade-v2.8"},{kind:"MdxPage",name:"wordpress",route:"/installation/wordpress"}]}],flexsearch:{codeblocks:!0},title:"External services",headings:l},pageNextRoute:"/advanced/services",nextraLayout:i.ZP,themeConfig:r.Z};n.default=(0,t.j)(c)},2702:function(e,n,s){"use strict";var o=s(5893);n.Z={logo:(0,o.jsx)("span",{children:"CookieHub Docs"}),primaryHue:360,primarySaturation:100,editLink:{text:""},feedback:{content:null},sidebar:{defaultMenuCollapseLevel:2,autoCollapse:!0},useNextSeoProps:()=>({titleTemplate:"%s – CookieHub Docs"}),banner:{},footer:{text:(0,o.jsxs)("span",{children:["\xa9",new Date().getFullYear()," CookieHub"]})}}},5789:function(){}},function(e){e.O(0,[9774,4543,2888,179],function(){return e(e.s=8767)}),_N_E=e.O()}]);