Tagged: x
-
AuthorPosts
-
January 16, 2017 at 1:48 am #1331611
crags_38ParticipantHi
I would like to add the Google remarketing Tag to my site. I understand that this is best to out in the functions.php file of a child theme. I have a child theme set up and have looked at this file. I have also been told it needs to go just before the </body> tag, which I can not see in this file.
Can you please assist me in this.
Thanks
Craig
PS, I have already added a Facebook tracking pixel to the above mentioned page.
January 16, 2017 at 2:00 am #1331625
LelyModeratorHello Craig,
Thanks for posting in.
Please add this on your functions.php file:function my_googleremark_footer_output() { ?> <!–- Google Code for Remarketing Tag goes here -–> <?php } add_action( 'wp_footer', 'my_googleremark_footer_output', 99 );Hope this helps.
January 17, 2017 at 12:44 am #1333112
crags_38ParticipantI already have the Facebook tracking pixel in this file, so have just put this code directly below it, separated by one blank line – is that ok?
I assume that by putting it in the functions.php file, it is effectively inserted everywhere on the site then?
Thanks
Craig
January 17, 2017 at 1:49 am #1333159
crags_38ParticipantI have just used Google’s Tag Assistant, and it says that this tag needs to be placed above the closing body tag, but there are no body tags that I can see in the functions.php file
What can be done about this?
Craig
January 17, 2017 at 3:19 am #1333219
LelyModeratorHello Craig,
If the facebook tracking pixel code is also added in wp-footer, that is fine to add. Something like this:
function thirdparty_tracking_code() { ?> <!–- FB tracking code -–> <!–- Google Code for Remarketing Tag goes here -–> <?php } add_action( 'wp_footer', 'thirdparty_tracking_code', 99 );The add_action indicated where the code is added. In this case, it is on wp-footer that indicates before closing of body tag. See this:https://codex.wordpress.org/Plugin_API/Action_Reference/wp_footer
Hope this helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1331611 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
