-
AuthorPosts
-
June 29, 2016 at 4:22 pm #654907
Hey guys
This may be elementary, but how do I add code like FaceBook Pixel and Google Remarketing to the header and footer where I am not redoing it every time I update WordPress or the site’s theme? I am trying to minimize use of plugins. But is that is my only option, s be it.I am guessing that there’s maybe a way to code it within the theme-functions (function.php) file?
Thanks!
JustinJuly 1, 2016 at 5:56 am #655513Hey Justin,
For code that should go in the header you should be able to use the Analytics field in the backend. The code in the footer we will need to add through a function, could you post the code you want to add and where it should go please?
Best regards,
RikardMarch 19, 2017 at 2:20 am #763051Hi Rikard,
I too would really like to minimize my use of plugins. I just updated my Enfold Child Theme and lost the footer changes I’d made to include my Google Remarketing Tag. Can I get some help with this as well?
After I composed this post yesterday, I tried adding it to the Enfold Child Theme’s Google , pasting it under the Google Analytics Script. According to the Google Tag Assistant it’s working! Hurrah.
Is this the “correct method” for adding both Google Analytics and Google Remarketing to Enfold?
Thanks!
Aaron- This reply was modified 7 years, 9 months ago by ConnectedEvent. Reason: I was able to fix the issue I believe. Used Enfold Child Theme and Google Analytics area
March 20, 2017 at 5:30 am #763474Hi,
Please try the following in your child theme’s functions.php file:
function add_google_remarketing(){ ?> <script type=”text/javascript”> /* <![CDATA[ */ var google_conversion_id = 863976582; 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> <?php } add_action('wp_footer', 'add_google_remarketing');
Best regards,
RikardJune 8, 2017 at 8:32 pm #805732and How do I add Facebook remarketing to my child theme?
June 9, 2017 at 11:09 am #806010 -
AuthorPosts
- You must be logged in to reply to this topic.