Hi,
We’ve been asked to add the following code between head … /head after successfull transactions, so we can track customers coming from FB ads:
var fb_param = {};
fb_param.pixel_id = ’6126127243264′;
fb_param.value = ’0.00′;
(function(){
var fpw = document.createElement(‘script’);
fpw.async = true;
fpw.src = (location.protocol==’http:’?'http’:'https’)+’://connect.facebook.net/en_US/fp.js’;
var ref = document.getElementsByTagName(‘script’)[0];
ref.parentNode.insertBefore(fpw, ref);
})();
Since, the head … /head part of the webpage is constructed inside shoppica2\template\common\header.tpl, which is included in all pages we can not incorporate it there. Instead, we’ve created the following vqmod:
<![CDATA[]]>
<![CDATA[
var fb_param = {};
fb_param.pixel_id = '6126127243264';
fb_param.value = '0.00';
(function(){
var fpw = document.createElement('script');
fpw.async = true;
fpw.src = (location.protocol=='http:'?'http':'https')+'://connect.facebook.net/en_US/fp.js';
var ref = document.getElementsByTagName('script')[0];
ref.parentNode.insertBefore(fpw, ref);
})();
]]>
Would that be OK?
Thank you!
-
This reply was modified 4117 days ago by devplus.
-
This reply was modified 4117 days ago by devplus.
|
|
Hi,
As far as the code you need to put is correct, there shouldn’t be any problem
Best,
ThemeBurn team
|
|