Skip to content

Commit 044dfc5

Browse files
[DR-371] Added meta pixel to docs pages (#48)
https://reddit.atlassian.net/browse/DR-371 <!-- If this pull request closes an issue, please mention the issue number below --> Closes # <!-- Issue # here --> ## 💸 TL;DR <!-- What's the three sentence summary of purpose of the PR --> ## 📜 Details [Design Doc](<!-- insert Google Doc link here if applicable -->) [Jira](<!-- insert Jira link if applicable -->) <!-- Add additional details required for the PR: breaking changes, screenshots, external dependency changes --> ## 🧪 Testing Steps / Validation <!-- add details on how this PR has been tested, include reproductions and screenshots where applicable --> ## ✅ Checks <!-- Make sure your pr passes the CI checks and do check the following fields as needed - --> - [ ] CI tests (if present) are passing - [ ] Adheres to code style for repo - [ ] Contributor License Agreement (CLA) completed if not a Reddit employee
1 parent fa365e7 commit 044dfc5

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

docusaurus.config.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,25 @@ const config: Config = {
2323
onBrokenMarkdownLinks: "throw",
2424
},
2525
},
26+
headTags: [
27+
// Added to headTags instead of scripts to keep the script and noscript tags together
28+
// Start meta tag for Facebook Pixel DR-371
29+
{
30+
tagName: "script",
31+
attributes: {},
32+
innerHTML: `!function(f,b,e,v,n,t,s)
33+
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
34+
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
35+
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
36+
n.queue=[];t=b.createElement(e);t.async=!0;
37+
t.src=v;s=b.getElementsByTagName(e)[0];
38+
s.parentNode.insertBefore(t,s)}(window, document,'script',
39+
'https://connect.facebook.net/en_US/fbevents.js');
40+
fbq('init', '4294970040755652');
41+
fbq('track', 'PageView');`,
42+
},
43+
// End meta tag for Facebook Pixel
44+
],
2645
scripts: [
2746
{
2847
src: "https://widget.kapa.ai/kapa-widget.bundle.js",

0 commit comments

Comments
 (0)