Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config option for Facebook Pixel ID #503

Closed
pestevez opened this issue Mar 13, 2018 · 4 comments
Closed

Add config option for Facebook Pixel ID #503

pestevez opened this issue Mar 13, 2018 · 4 comments
Labels
difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan. good first issue If you are just getting started with Docusaurus, this issue should be a good place to begin. status: claimed Issue has been claimed by a contributor who plans to work on it.

Comments

@pestevez
Copy link
Contributor

Is this a bug report?

No, this is a feature request.

Have you read the Contributing Guidelines on issues?

Yes.

Proposal

Add a new config field facebookPixelId to support analytics using the Facebook Pixel.

We would then add the following script in Site.js:

<script>
     !function(f,b,e,v,n,t,s)
     {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
     n.callMethod.apply(n,arguments):n.queue.push(arguments)};
     if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
     n.queue=[];t=b.createElement(e);t.async=!0;
     t.src=v;s=b.getElementsByTagName(e)[0];
     s.parentNode.insertBefore(t,s)}(window, document,'script',
     'https://connect.facebook.net/en_US/fbevents.js');
     fbq('init', 'YOUR-PIXEL-ID');
     fbq('track', 'PageView');
</script>

similar to what we do for the Facebook SDK.

@pestevez
Copy link
Contributor Author

I am happy to submit a pull request if this proposal makes sense to the team.

@JoelMarcey JoelMarcey added good first issue If you are just getting started with Docusaurus, this issue should be a good place to begin. difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan. status: claimed Issue has been claimed by a contributor who plans to work on it. labels Mar 14, 2018
@JoelMarcey
Copy link
Contributor

@pestevez Hi! Nice to virtually meet a fellower FB'er. I would love for you to submit a PR for this. I don't see why we wouldn't want something like this, but a PR would help us get more eyes on it possibly.

I am going to consider this issue claimed.

@pestevez pestevez changed the title [Proposal] Add config option for Facebook Pixel ID Add config option for Facebook Pixel ID Mar 14, 2018
@pestevez
Copy link
Contributor Author

Nice to e-meet you too, @JoelMarcey! The PR is coming soon.

@pestevez
Copy link
Contributor Author

Fixed by #507

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan. good first issue If you are just getting started with Docusaurus, this issue should be a good place to begin. status: claimed Issue has been claimed by a contributor who plans to work on it.
Projects
None yet
Development

No branches or pull requests

2 participants