- Copy
google-global-site-tag.php
to/wp-content/mu-plugins/
- On WordPress admin go to Settings / General
- Enter your Facebook Pixel ID, click "Save settings"
Disables the tracking code.
Define it as true
in wp-config
.
By default the tracking code is enabled.
Inserts the tracking code immediately after the opening <head>
tag.
Define it as true
in wp-config
.
Default is before the closing </body>
tag.
Disable for users with this capability. Defaults to edit_pages
Custom usage in your theme.
// In wp-config
define( 'GST_DISABLE', true );
// In the theme
print gst()->get_code();
On development sites the tracking code is not enabled, when WP_ENV
is not production
.