Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // By the template_include fires TEC should know what view is being loaded
- add_filter('template_include', 'eventAnalytics', 50);
- /**
- * Test to see if it is the month view and embed GA code in the footer if so.
- *
- * @param $passthrough
- * @return mixed
- */
- function eventAnalytics($passthrough) {
- if (tribe_is_month()) add_action('wp_footer', 'embedGAQ');
- return $passthrough;
- }
- /**
- * Embed Google Analytics code
- */
- function embedGAQ() {
- echo '<script>/* Code goes here */</code>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement