Analytics

GitHub

Adds an "Analytics" section to the customizer which has one field for a Google Analytics Tracking ID.

If ENVIRONMENT is set to production, and a Tracking ID is present, the following snippet will output the Google Analytics script with the Tracking ID:

<?php
// Google Analytics.
echo (new WPDD\Analytics\Display())->googleAnalyticsTracking();
?>