Yii Framework Forum: How To Insert Facebook Conversion Pixel To Header Tag - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How To Insert Facebook Conversion Pixel To Header Tag Rate Topic: -----

#1 User is offline   Mister Ijoi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 12-March 13

Posted 25 May 2014 - 04:30 AM

Anyone have idea how to insert this code in header tag?

by my reading it can be done using CClientScript

<!-- Facebook Conversion Code for cashout -->
<script type="text/javascript">
var fb_param = {};
fb_param.pixel_id = 'XXXX';
fb_param.value = '0.00';
fb_param.currency = 'MYR';
(function(){
  var fpw = document.createElement('script');
  fpw.async = true;
  fpw.src = '//connect.facebook.net/en_US/fp.js';
  var ref = document.getElementsByTagName('script')[0];
  ref.parentNode.insertBefore(fpw, ref);
})();
</script>
<noscript><img height="1" width="1" alt="" style="display:none" src="facebook.com/offsite_event.php?id=XXXX&amp;value=0&amp;currency=MYR" /></noscript>


Thanks in advance
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users