View Single Post
  #10  
Old 07-12-2016, 10:00 AM
 
magicant magicant is offline
 

Advanced Member
  
Join Date: Jan 2004
Location: Manchester UK
Posts: 62
 

Default Special Facebook Pixel Code Being Minified

Hi Guys..

I am trying to include the exact code below.

I have setup a facebook_tracker.tpl and referenced it inside reboot_service_head.tpl

It is showing up in google chrome but not all of the pixel is loading correctly.

The tech support team from the special pixel code says the following:

========
Our developer checked your site, and it seems you've "minified" our JS file (to make it smaller). However, because of that it stopped working. Please make sure to use our original code, without minimizing it. That should do the trick!
========

If this means it is shrinking the js file how can I make sure it does not?

They explain to use the Facebook Pixel Helper Chrome plugin to detect if alright or not. it's installed at: www.magicworld.co.uk/magic-shop/

Many Thanks - can't wait to fix

Anthony

{literal}
=========PIXEL START=========
<script type='text/javascript' src='https://connectio.s3.amazonaws.com/script.js'></script><script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=f unction(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(argum ents)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','//connect.facebook.net/en_US/fbevents.js');
fbq('init', '175682379449572');
fbq('track', 'PageView');
/* page visit*/
fbq('trackCustom', 'connectretarget', {
magicworld_visitcounter: bpixelcookie
});
/* URL */
fbq('trackCustom', 'connectretarget', {
magicworld_URL : window.location.href
});
/*page timer*/
CR_pagetimer('connectretarget', count);
fbq('trackCustom', 'connectretarget', {
magicworld_date : now
});
fbq('trackCustom', 'connectretarget', {
magicworld_language : userLang
});
fbq('trackCustom', 'connectretarget', {
magicworld_visiting_device : device_name
});
fbq('trackCustom', 'connectretarget', {
magicworld_session_count : session_variable
});
/* page scroll */
window.onscroll = function() {
checkScroll();
};
function CR_pagescroll(event, value)
{
fbq('trackCustom', event,{
magicworld_pagescroll : value });
}
function CR_utmsource(event, value)
{
fbq('trackCustom', event,{
magicworld_utmsource : value });
}
function CR_utmmedium(event, value)
{
fbq('trackCustom', event,{
magicworld_utmmedium : value });
}
function CR_utmcampaign(event, value)
{
fbq('trackCustom', event,{
magicworld_utmcampaign : value });
}
function CR_pagetimer(event, value)
{
window.setInterval(function(){
count = count + 20;
fbq('trackCustom', event, {
magicworld_pagetimer : count
});
}, 20000);
}fbq('trackCustom', 'connectretarget', {
magicworld_source : referrer
});</script>
{/literal}
__________________
X-Cart Version: 4.7.6
PHP 5.3.29
MySQL server 5.6.29
MySQL client 5.6.29
Reply With Quote