Thanks to some outside help the answer was simplistic, I just need to hook into this
add_action( 'wp_footer', 'AddTrackingScript' );
and then simply echo it out and it then gets spat out at the end of the page.
function AddTrackingScript() {
echo '<script type="text/javascript">....</script>';
}
Related Posts:
- Extract image from content and set it as the featured image
- Edit the_content function
- Remove image from post_content on save_post
- Make WordPress size and name images for Retina.js
- WordPress function/template tag to get first n words of the content
- Pinterest Integration Using functions.php
- Allowing SVG uploads in media uploader without plug-in
- Unable to get_the_content(); of a post in WordPress via AJAX
- Automatically wrap multiple images in div
- Display post shortcode content in the sidebar?
- If user is logged-in display/hide something
- Tags break custom Excerpt function
- the_excerpt function not showing image
- What is best practices to move the following code into a function?
- Regex works in regexr, but not if I filter content [closed]
- Problem in outputting shortcode
- Problem in shortcode outputting content
- Integrating custom API for post content into Admin interface & Public Website [closed]
- Trying to get this function to show below the content
- Upload Multiple Files With media_handle_upload
- Add custom template page programmatically
- What is the difference between get_page_link and get_permalink functions?
- Woocommerce add to simple product attribute programmatically [closed]
- Breadcrumbs showing Parent and Child Pages
- Influence of WordPress functions on site speed
- mysql custom wp query
- TinyMCE custom stylesheets for different post types
- Order get_users() by last login date. Is it possible?
- Display random text from a file with the WP built-in AJAX API
- Remove bulk actions based on user role or capabilities
- wp_delete_attachment
- Function to Download External Images to My Site
- How to call a function on particular page like ‘contact-us’ from function.php of child theme
- Detect Safari desktop browser and include the detection in a shortcode
- Is It wrong to use oop approach on functions.php?
- How to preserve edits to Name or Slug of term when using wp_update_term on save?
- Woocommerce checkout field maxlength, make input number field only (postcode)
- My simple custom shortcode is not longer working (possibly due to upgrade to WordPress 4.4 ?)
- How Can I Expand the WordPress Customize window without any Plugin?
- Register and enqueue style.css custom theme
- Where do I add html code to the menu div?
- Add function to every post?
- Removing permalink from post thumb in twentyeleven
- Publish/Update post is changing image links from file url to post url
- Product object returns no sale price
- How to stop twenty fifteen theme from cropping featured images?
- Option Tree integration of Custom CSS
- Deprecated function get_user_by_email($email)
- Don’t display html if function returns nothing
- Shortcode parse error – wrong syntax
- Load custom css in functions.php causing library issue
- In jquery use php variable to execute an enqueued jquery file
- Run a jquery script on on a certain template page
- How to stop media_sideload_image from running when deleting a post?
- I want to display latest post in marquee [closed]
- Add php code to wp_print_scripts?
- How to get an attachment id from a filename
- Remove ‘page-numbers’ class from prev and next tags
- Can’t add_action to ‘save_post’ and get it to fire
- How can I set the SRC URL of the custom logo image?
- How to load jQuery in TOP of wp_footer?
- How to fetch custom post type by variable date?
- How to make custom comment fields required
- two search forms on the same page
- Getting out side of wp root folder from function.php using absolute path
- How do I register a new settings page? [closed]
- Include Jquery libraries in wordpress theme?
- WooCommerce -> wc_enqueue_js not working [closed]
- Use existing image sizes for WooCommerce
- Strange error from functions.php files (wp_register_script)
- Retrieve First Image Function
- User meta and public function security
- Any adverse effects of adding apply_filters to a function?
- Display ACF category image on archive and single template files
- How to get taxonomy tree ids without running expensive loops
- Change WooCommerce Payment Options From Radio Buttons to Dropdown Menu
- Auto delete content in specific folder inside media library
- Using get_terms for custom taxonomy in functions.php
- How to update an image attachment’s alt text from a custom field when saving a post?
- Allow user only create specific tags
- Child theme remove parent filter in functions
- Set URL Parameter Post Layout As Default
- Exclude admins from query get posts
- Enqueue JS + CSS via a child theme functions.php file?
- How to add publish/draft button in Admin Post Lists
- Show users last read posts for each user?
- Woocommerce – change order status from on-hold to pending payment
- How to add number to wordpress count function?
- How do I integrate my Child Theme into a Custom Template?
- Sending Messages Back to the Template After Processing?
- Shortcode to eliminate and replace with
- Why are some custom javascript files working but some are not
- using enqueue_script in a shortcode isn’t working
- How to use wp_editor(); in functions.php then retrieve content in the template
- How to display milliseconds instead of seconds using timer_stop function? [closed]
- Filter to strip unnecessary attributes
- Will my WordPress site become vulnerable after adding this functions which allows more HTML tags for subscribers?
- get_post_class() not working well
- How do i set global variable in a function in wordpress functions.php
- Working function() doesn’t execute when triggered by WP CRON