Created
July 30, 2013 21:27
-
-
Save joshfeck/6117153 to your computer and use it in GitHub Desktop.
A few functions that will allow you to insert tracking code into the head of the document on the single registration page. You can substitute the hook if you want the tracking code to go on another page. Requires WordPress + Event Espresso 3.x Support forum post: http://eventespresso.com/topic/is-there-a-way-to-insert-tracking-codes-in-within-th…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action ( 'action_hook_espresso_social_display_buttons', 'itc_add_tracking_code_hook'); | |
| add_action ( 'wp_head', 'itc_print_tracking_code' ); | |
| function itc_add_tracking_code_hook () { | |
| global $add_my_tracking_code; | |
| $add_my_tracking_code = true; | |
| } | |
| function itc_print_tracking_code () { | |
| global $add_my_tracking_code; | |
| if ( ! $add_my_tracking_code ) | |
| return; | |
| ?> | |
| <script type="text/javascript"> | |
| // your tracking code goes here | |
| </script> | |
| <?php | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment