Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114 Is there a way to insert Tracking Codes in within the tag? | Event Espresso - Staging Server
I have a tracking code, but I want to monitor its conversion. Is there a way to insert tracking code to the event itself within the <head> tag? I can’t find a way to do it. Any suggestion?
Here’s one suggestion that might help: There’s a WordPress action hook that lets you add code to the head of the document. Along with that, there’s a hook in Event Espresso’s registration_page_display.php template that can be used to make it so the tracking code gets added to *only* the registration page.
Here is some example code that shows how to make this happen:
@Josh.. Do you have a step by step instruction on how to do the workaround on this? Another question, when I add a code, is there a way to just add it in one event only? Sometimes, when you work with the hooks, other similar pages also gets the custom tracking code.
1) Create a file called custom_functions.php in your /wp-content/uploads/espresso/ folder.
2) Add the functions to it.
To make the tracking code get added to one event only you can add a check. Here is a modified version of the above gist that check to see if the event_id is 15. If it’s 15 it will load the tracking code, if it’s not event #15, it will not load the tracking code.
The action_hook_espresso_social_display_buttons hook only runs in one place in Event Espresso: the registration page template, no where else. This makes it an acceptable hook to use when you want to only run code on a registration page because it will not run anywhere else on the website.
Viewing 3 reply threads
The support post ‘Is there a way to insert Tracking Codes in within the tag?’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.