{"id":3748,"date":"2021-01-11T16:58:22","date_gmt":"2021-01-11T16:58:22","guid":{"rendered":"https:\/\/www.leadshook.com\/help\/?p=3748"},"modified":"2024-02-14T11:40:27","modified_gmt":"2024-02-14T11:40:27","slug":"fb-hash","status":"publish","type":"post","link":"https:\/\/www.leadshook.com\/help\/fb-hash\/","title":{"rendered":"FB Hash"},"content":{"rendered":"\n<ul class=\"wp-block-list\">\n<li>Some FB users require their data for FB to be cryptographically secure<\/li>\n\n\n\n<li>Facebook allow this using SHA256 ( Secure Hash Algorithm ) <\/li>\n\n\n\n<li>Here we will demonstrate how to do this<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">First we need to add our scripts to the global or DT level scripts section. ( In the DT settings )<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That means the FB pixel and the js-sha256 library. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Both above the &lt;head&gt; Like so:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"545\" src=\"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-2-1024x545.png\" alt=\"\" class=\"wp-image-3754\" srcset=\"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-2-1024x545.png 1024w, https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-2-300x160.png 300w, https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-2-768x409.png 768w, https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-2-60x32.png 60w, https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-2-150x80.png 150w, https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-2.png 1174w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The library tag to copy\/paste looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;script src=\"<a target=\"_blank\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/js-sha256\/0.9.0\/sha256.js\" rel=\"noreferrer noopener\">https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/js-sha256\/0.9.0\/sha256.js<\/a>\" integrity=\"sha512-8WAv\/Z7UaDv0U1DCJ3W1oul76HOvq2\/9mc+IbOZGsTj9iwZnnCXL\/0FS6GQKNR++krdfVn9kuAAQ6v2DqZ9uEQ==\" crossorigin=\"anonymous\"&gt;&lt;\/script&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In a node you want to track setup a node level script like so. ( Inside the node on the bottom right )<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"962\" height=\"201\" src=\"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-1.png\" alt=\"\" class=\"wp-image-3751\" srcset=\"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-1.png 962w, https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-1-300x63.png 300w, https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-1-768x160.png 768w, https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-1-60x13.png 60w, https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-1-150x31.png 150w\" sizes=\"(max-width: 962px) 100vw, 962px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Then copy paste this tracking code into the script.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;script&gt;\n \/\/Create a UNIX timestamp\n ts = Math.round((new Date()).getTime() \/ 1000);\n \/\/Capture the answer\n answer = '{_c_answer}';\n \/\/Create the hash\n hash = sha256(answer);\n \/\/Fire the FB pixel  \n fbq('track', 'ViewContent', {\n   event_time: ts,\n   content_name: '{_c_dt}',\n   content_category: '{_c_node}',\n   content_ids: &#91;'{_c_question}'],\n   content_type: hash\n });\n&lt;\/script&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Done!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First we need to add our scripts to the global or DT level scripts section. ( In the DT settings ) That means the FB pixel and the js-sha256 library. Both above the &lt;head&gt; Like so: The library tag to copy\/paste looks like this: In a node you want to track setup a node level [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[620,26,239],"tags":[100,793,794],"class_list":["post-3748","post","type-post","status-publish","format-standard","hentry","category-scripts","category-security","category-tracking","tag-facebook","tag-hash","tag-hashing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>FB Hash - LeadsHook Knowledge Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.leadshook.com\/help\/fb-hash\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FB Hash - LeadsHook Knowledge Base\" \/>\n<meta property=\"og:description\" content=\"First we need to add our scripts to the global or DT level scripts section. ( In the DT settings ) That means the FB pixel and the js-sha256 library. Both above the &lt;head&gt; Like so: The library tag to copy\/paste looks like this: In a node you want to track setup a node level [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.leadshook.com\/help\/fb-hash\/\" \/>\n<meta property=\"og:site_name\" content=\"LeadsHook Knowledge Base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/leadshook\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-11T16:58:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-14T11:40:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-2-1024x545.png\" \/>\n<meta name=\"author\" content=\"Nik T\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@leadshook\" \/>\n<meta name=\"twitter:site\" content=\"@leadshook\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nik T\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/fb-hash\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/fb-hash\\\/\"},\"author\":{\"name\":\"Nik T\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#\\\/schema\\\/person\\\/4bfe37d814563cc729828b7055313f4d\"},\"headline\":\"FB Hash\",\"datePublished\":\"2021-01-11T16:58:22+00:00\",\"dateModified\":\"2024-02-14T11:40:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/fb-hash\\\/\"},\"wordCount\":106,\"publisher\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/fb-hash\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/image-2-1024x545.png\",\"keywords\":[\"facebook\",\"hash\",\"hashing\"],\"articleSection\":[\"Scripts\",\"Security\",\"Tracking\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/fb-hash\\\/\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/fb-hash\\\/\",\"name\":\"FB Hash - LeadsHook Knowledge Base\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/fb-hash\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/fb-hash\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/image-2-1024x545.png\",\"datePublished\":\"2021-01-11T16:58:22+00:00\",\"dateModified\":\"2024-02-14T11:40:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/fb-hash\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.leadshook.com\\\/help\\\/fb-hash\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/fb-hash\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/image-2-1024x545.png\",\"contentUrl\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/image-2-1024x545.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/fb-hash\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FB Hash\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#website\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/\",\"name\":\"LeadsHook Knowledge Base\",\"description\":\"LeadsHook Training &amp; Technical Help\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#organization\",\"name\":\"LeadsHook\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/leadshook-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/leadshook-logo.png\",\"width\":350,\"height\":83,\"caption\":\"LeadsHook\"},\"image\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/leadshook\\\/\",\"https:\\\/\\\/x.com\\\/leadshook\",\"https:\\\/\\\/www.linkedin.com\\\/showcase\\\/leadshook\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#\\\/schema\\\/person\\\/4bfe37d814563cc729828b7055313f4d\",\"name\":\"Nik T\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/48d53e68db0b1db1cd5c54a750130fb2ee0c663306ff1bd434373f1a368ef7a0?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/48d53e68db0b1db1cd5c54a750130fb2ee0c663306ff1bd434373f1a368ef7a0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/48d53e68db0b1db1cd5c54a750130fb2ee0c663306ff1bd434373f1a368ef7a0?s=96&d=mm&r=g\",\"caption\":\"Nik T\"},\"sameAs\":[\"http:\\\/\\\/www.LeadsHook.com\"],\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/author\\\/nik\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"FB Hash - LeadsHook Knowledge Base","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.leadshook.com\/help\/fb-hash\/","og_locale":"en_US","og_type":"article","og_title":"FB Hash - LeadsHook Knowledge Base","og_description":"First we need to add our scripts to the global or DT level scripts section. ( In the DT settings ) That means the FB pixel and the js-sha256 library. Both above the &lt;head&gt; Like so: The library tag to copy\/paste looks like this: In a node you want to track setup a node level [&hellip;]","og_url":"https:\/\/www.leadshook.com\/help\/fb-hash\/","og_site_name":"LeadsHook Knowledge Base","article_publisher":"https:\/\/www.facebook.com\/leadshook\/","article_published_time":"2021-01-11T16:58:22+00:00","article_modified_time":"2024-02-14T11:40:27+00:00","og_image":[{"url":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-2-1024x545.png","type":"","width":"","height":""}],"author":"Nik T","twitter_card":"summary_large_image","twitter_creator":"@leadshook","twitter_site":"@leadshook","twitter_misc":{"Written by":"Nik T","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.leadshook.com\/help\/fb-hash\/#article","isPartOf":{"@id":"https:\/\/www.leadshook.com\/help\/fb-hash\/"},"author":{"name":"Nik T","@id":"https:\/\/www.leadshook.com\/help\/#\/schema\/person\/4bfe37d814563cc729828b7055313f4d"},"headline":"FB Hash","datePublished":"2021-01-11T16:58:22+00:00","dateModified":"2024-02-14T11:40:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.leadshook.com\/help\/fb-hash\/"},"wordCount":106,"publisher":{"@id":"https:\/\/www.leadshook.com\/help\/#organization"},"image":{"@id":"https:\/\/www.leadshook.com\/help\/fb-hash\/#primaryimage"},"thumbnailUrl":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-2-1024x545.png","keywords":["facebook","hash","hashing"],"articleSection":["Scripts","Security","Tracking"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.leadshook.com\/help\/fb-hash\/","url":"https:\/\/www.leadshook.com\/help\/fb-hash\/","name":"FB Hash - LeadsHook Knowledge Base","isPartOf":{"@id":"https:\/\/www.leadshook.com\/help\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.leadshook.com\/help\/fb-hash\/#primaryimage"},"image":{"@id":"https:\/\/www.leadshook.com\/help\/fb-hash\/#primaryimage"},"thumbnailUrl":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-2-1024x545.png","datePublished":"2021-01-11T16:58:22+00:00","dateModified":"2024-02-14T11:40:27+00:00","breadcrumb":{"@id":"https:\/\/www.leadshook.com\/help\/fb-hash\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.leadshook.com\/help\/fb-hash\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.leadshook.com\/help\/fb-hash\/#primaryimage","url":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-2-1024x545.png","contentUrl":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2021\/01\/image-2-1024x545.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.leadshook.com\/help\/fb-hash\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.leadshook.com\/help\/"},{"@type":"ListItem","position":2,"name":"FB Hash"}]},{"@type":"WebSite","@id":"https:\/\/www.leadshook.com\/help\/#website","url":"https:\/\/www.leadshook.com\/help\/","name":"LeadsHook Knowledge Base","description":"LeadsHook Training &amp; Technical Help","publisher":{"@id":"https:\/\/www.leadshook.com\/help\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.leadshook.com\/help\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.leadshook.com\/help\/#organization","name":"LeadsHook","url":"https:\/\/www.leadshook.com\/help\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.leadshook.com\/help\/#\/schema\/logo\/image\/","url":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2018\/12\/leadshook-logo.png","contentUrl":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2018\/12\/leadshook-logo.png","width":350,"height":83,"caption":"LeadsHook"},"image":{"@id":"https:\/\/www.leadshook.com\/help\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/leadshook\/","https:\/\/x.com\/leadshook","https:\/\/www.linkedin.com\/showcase\/leadshook\/"]},{"@type":"Person","@id":"https:\/\/www.leadshook.com\/help\/#\/schema\/person\/4bfe37d814563cc729828b7055313f4d","name":"Nik T","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/48d53e68db0b1db1cd5c54a750130fb2ee0c663306ff1bd434373f1a368ef7a0?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/48d53e68db0b1db1cd5c54a750130fb2ee0c663306ff1bd434373f1a368ef7a0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/48d53e68db0b1db1cd5c54a750130fb2ee0c663306ff1bd434373f1a368ef7a0?s=96&d=mm&r=g","caption":"Nik T"},"sameAs":["http:\/\/www.LeadsHook.com"],"url":"https:\/\/www.leadshook.com\/help\/author\/nik\/"}]}},"_links":{"self":[{"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/posts\/3748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/comments?post=3748"}],"version-history":[{"count":6,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/posts\/3748\/revisions"}],"predecessor-version":[{"id":6061,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/posts\/3748\/revisions\/6061"}],"wp:attachment":[{"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/media?parent=3748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/categories?post=3748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/tags?post=3748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}