Tagged: script, Tracking Code
I’m trying to get the following the script in the code before </head>
<script src=’https://activedemand-static.s3.amazonaws.com/public/javascript/jquery.tracker.compiled.js.gz’ type=’text/javascript’></script>
Initially, I put it in with the Google Analytics script but that puts it way below </head>. Then I put it in the header.php at line 43 based on the notes in the fill, but it caused a syntex problem with serving up the site.
Hey MtnStreamGroup,
Please try the following in your functions.php file:
function enfold_add_custom_header_code(){
<script src=’https://activedemand-static.s3.amazonaws.com/public/javascript/jquery.tracker.compiled.js.gz’ type=’text/javascript’></script>
}
add_action('wp_head', 'enfold_add_custom_header_code');
Regards,
Rikard
I forgot to mention that I’m also using a child theme. Can the code that you are recommending be included in the child theme so that it doesn’t have to be reinstalled everytime Enfold changes?
Hi,
Yes the code provided can be used in child themes function.php and the code in child theme will remain intact after enfold main theme updates.
Best regards,
Vinay