Hi all. I want to add the Google Analytics Tracking Code script across all of my pages. Can I paste this into enfolds Google Analytics Tracking Code setting or does it need to be done another way?
<script type=”text/javascript”>
/* <![CDATA[ */
var google_conversion_id = 965951940;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type=”text/javascript” src=”//www.googleadservices.com/pagead/conversion.js”>
</script>
<noscript>
<div style=”display:inline;”>
</div>
</noscript>
Hey!
Yes, you can put it right there (Google Analytics Tracking Code setting).
Cheers!
Josue
Hey!
Alternatively you could put any <script></script> code inside a Code Block element in the pages you want to track.
Best regards,
Josue
Hey!
Try adding it to the footer instead. Add this to the bottom of your functions.php file.
add_action( 'wp_footer', 'enfold_customization_footerscripts' );
function enfold_customization_footerscripts() {
?>
<script type = "text/javascript">
your code goes here
</script>
<?php
}
And then replace “your code goes here” with the code you need to use. If your code already has script tags then remove them.
Regards,
Elliott
Hi,
Can I add the remarketing code to the Google Analytics Tracking Code box under Enfold Theme options?
Hi!
I’ve never tested it so you can try but if your getting errors then do what is suggested in my last post.
Best regards,
Elliott
Adding the remarketing code to the Google Analytics Tracking Code box under Enfold Theme options worked for me. I checked it with Google Tag Assistant (Chrome extension) and it found no errors.
Hi,
Glad you found a workaround and thank you for sharing the tip :)
Best regards,
Vinay