• I’m trying to use facebook tracking pixel for contact events.

    I’ve this in my header:

    <!-- 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', '273771023073210'); // Insert your pixel ID here.
    fbq('track', 'PageView');
    </script>
    <noscript><img height="1" width="1" style="display:none"
    src="https://www.facebook.com/tr?id=273771023073210&ev=PageView&noscript=1"
    /></noscript>
    <!-- DO NOT MODIFY -->
    <!-- End Facebook Pixel Code -->

    Then I’ve this in my additional settings:

    on_sent_ok:"fbq(‘track’, ‘Lead’);"

    per this guide: https://plankton.com.au/facebook/tracking-facebook-leads-wordpress-contact-form/

    It doesn’t seem to work. Is there a WPC7 guide to using the fb tracking pixel?

Viewing 5 replies - 1 through 5 (of 5 total)
  • I have using contact form 7 (version 4.7). I have this basic form:
    <label> Su Nombre (required)
    [text* your-name] </label>
    <label> Su email (required)
    [email* your-email] </label>
    <label> Subject
    [text your-subject] </label>
    <label> Your Message
    [textarea your-message] </label>
    [recaptcha]
    [submit “Send”]

    I complete the form, including the recapcha(validated), but I am getting the error “There was an error trying to send your message. Please try again later.” when I send the form. However if I delete the recapcha the form is sended properly.
    Please could you help me?

    Thanks

    Sorry I wanted to create a new topic, not reply this issue

    Thread Starter btees

    (@btees)

    Anyone have anything on this?

    • This reply was modified 7 years, 7 months ago by btees.

    Hey @btees & @creprodu! I think it’s just the apostrophes that you’re using in the Contact Form 7 code.

    Currently, you have: on_sent_ok:”fbq(‘track’, ‘Lead’);”

    Notice the apostrophes around track and Lead.

    vs what is correct below:

    on_sent_ok:”fbq(‘track’, ‘Lead’);”

    ‘ vs ‘

    I don’t think this forum is showing the difference of apostrophes in my post here, but look at your code in your original post and see the difference between the <head> code and the CF7 code. You can see the difference between the 2. The apostrophes in the <head> code is the correct type.

    Hope this helps!

    Still waiting for an asnwer from the plugin author please!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Facebook tracking pixel’ is closed to new replies.