• Resolved cekaraz

    (@cekaraz)


    Hi there,
    thank you for your wonderful plugin, it really has sped up my wordpress site a lot!

    In the new version I have a problem with the facebook pixel tracking pageviews, but not tracking the Viewcontent event (fb pixel helper tells there is a problem).
    I tried disabling javascript processing in FVM and everything works back as normal.
    I tried removing function(f,b,e,v,n,t,s) and fbq( from the “Delay after user interaction” section but with no success.
    In my consolle there is an “Uncaught SyntaxError: Unexpected end of input on this line” error that seem to be relevant to the issue:

    <script type="text/javascript">jQuery(function($){<!-- Facebook Pixel Event Code -->fbq('set','agent','wordpress-5.6.1-3.0.1','117381078872174');fbq('track','ViewContent',{"value":"65","currency":"eur","content_name":"Camicetta romantica nera anni '50","content_category":"Camicie e top","content_ids":["wc_post_id_4057"],"content_type":"product","fb_integration_tracking":"woocommerce"},{"eventID":"0fdd6d5b-fdf0-430e-b283-0a94f5ae549a"});<!-- End Facebook Pixel Event Code -->})</script>

    Do you know how I could fix this ?
    Do i have to put connect.facebook.net url in ignore too ?

    Thanks!
    Claudio

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Raul P.

    (@alignak)

    It looks like minification may be stripping something on the inline code.
    try to disable minification and see if it works.

    You can also try to simplify and add linebreaks to the code like this:

    <script type="text/javascript">
    fbq('set','agent','wordpress-5.6.1-3.0.1','117381078872174');
    fbq('track','ViewContent',
    	{
    		"value":"65", 
    		"currency":"eur",
    		"content_name":"Camicetta romantica nera anni '50",
    		"content_category":"Camicie e top",
    		"content_ids":["wc_post_id_4057"],
    		"content_type":"product",
    		"fb_integration_tracking":"woocommerce"
    	},{
    		"eventID":"0fdd6d5b-fdf0-430e-b283-0a94f5ae549a"
    	});
    </script>

    Either way, you need to debug by trying different settings.
    Each site needs it’s own settings, and some scripts may or may not support defer, or delaying.

Viewing 1 replies (of 1 total)
  • The topic ‘facebook viewcontent event not loading’ is closed to new replies.