Hi, I'm using Launch, and I keep seeing the error message 'expected an assignment or function call and instead saw an expression' for my Facebook Pixel Code.
Keeps showing the error below in red:
ts):n.queue.push(arguments)_};
Solved! Go to Solution.
Views
Replies
Total Likes
OK, custom code is easier for us to help with... but we will actually have to see the code...
Now, that underscore looks odd, it might be a typo... there is no such character in the sample pixel code:
https://developers.facebook.com/docs/meta-pixel/get-started/
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
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',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '{your-pixel-id-goes-here}');
fbq('track', 'PageView');
</script>
Could it just be you accidentally typed in a random character into the FB code?
Can you provide more details?
Are you using the FB Pixel extension? Or coding the pixel yourself via custom code?
I use custom code myself.. we may not have a lot of control with the extension but I will do my best to help you.
Using Custom Code.
As Jen alluded to will need more of pixel code to help troubleshoot can you publish entire pixel code (then obfuscate and private elements).
OK, custom code is easier for us to help with... but we will actually have to see the code...
Now, that underscore looks odd, it might be a typo... there is no such character in the sample pixel code:
https://developers.facebook.com/docs/meta-pixel/get-started/
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
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',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '{your-pixel-id-goes-here}');
fbq('track', 'PageView');
</script>
Could it just be you accidentally typed in a random character into the FB code?