Add option to defer loading pixel

Created on 10 February 2022, over 3 years ago
Updated 8 September 2024, about 1 year ago

Problem/Motivation

See
https://stackoverflow.com/questions/59835795/facebook-pixel-slows-down-p...

Proposed resolution

a) load async: https://stackoverflow.com/questions/44873285/loading-facebook-pixel-async
b) Move to footer by altering the library

This should be optional (by setting) as of https://developers.facebook.com/docs/meta-pixel/get-started saying

To install the Pixel, we highly recommend that you add its base code between the opening and closing tags on every page where you will be tracking website visitor actions. Most developers add it to their website's persistent header, so it can be used on all pages.

Placing the code within your tags reduces the chances of browsers or third-party code blocking the Pixel's execution. It also executes the code sooner, increasing the chance that your visitors are tracked before they leave your page.

Further resources:
https://coraldigital.io/google/increase-page-speed-defer-facebook-pixel/
https://josephpinder.com/blog/facebook-pixel-is-slowing-down-your-websit...

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Needs work

Version

2.0

Component

Code (Facebook Pixel)

Created by

πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024