This topic has 5 replies, 2 voices, and was last updated 9 years by marcogovoni.
-
Author
-
March 23, 2015 at 10:09 #51148marcogovoniParticipant
How can I put a code (a tracking facebook pixel code) in the Head section of a SPECIFIC page (in this case the registration page) ?
thank you
March 23, 2015 at 14:37 #51163RaduModeratorHello,
Add this code to your kleo-child functions.php
COPY CODEfunction checkpage() { if (is_page('contact')) { echo '<script>alert("Hello! I am an alert box!!")</script>'; } } add_action('wp_head','checkpage');
Replace the example code from echo with your preffered js code.
Also replace contact with your page slug.
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 24, 2015 at 19:35 #51384marcogovoniParticipantThe code is the facebook pixel for track conversion rate: it’s seems doesn’t work …. the code is the following:
<!– Facebook Conversion Code for registrazioni framevents –>
<script>(function() {
var _fbq = window._fbq || (window._fbq = []);
if (!_fbq.loaded) {
var fbds = document.createElement(‘script’);
fbds.async = true;
fbds.src = ‘//connect.facebook.net/en_US/fbds.js’;
var s = document.getElementsByTagName(‘script’)[0];
s.parentNode.insertBefore(fbds, s);
_fbq.loaded = true;
}
})();
window._fbq = window._fbq || [];
window._fbq.push([‘track’, ‘6023277124511’, {‘value’:’0.00′,’currency’:’EUR’}]);
</script>
<noscript></noscript>March 24, 2015 at 20:29 #51393RaduModeratorProvide that tracking code inside a
COPY CODEtag or attach a txt file with that code.
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.