Support » Plugin: Contact Form 7 Submission DOM tracking » FB Pixel Lead Tracking not working properly

  • Resolved hifunda

    (@hifunda)



    Hello there!

    Thanks for this plugin – I had been searching high and low for a way to track my contact form 7 leads with FB ads.

    I’ve been using the PixelCaffeine plugin for a while now, but not able to track contact form button clicks as LEADS on my site, consistently. No Pixel events are seen on Facebook. Sometimes I see it, but other times I don’t see the “lead” event firing in the Pixel helper chrome extension.

    Can you please check and tell me why?

    Thanks,
    Tara

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

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author apasionados

    (@apasionados)

    Hi Tara,

    For us it works correctly on the sites we are using it. We will check your page during this week and come back to you.

    Best regards from Spain.

    @apasionados Thanks a lot – please check, I will wait for a solution from you.
    Cheers from India!

    Plugin Author apasionados

    (@apasionados)

    Hi there,

    We have just checked your page and the inserted code doesn’t look correct.

    Which plugins do have active and what settings do you have selected in our plugin? Is there any other active plugin that tracks conversions?

    The code on your site looks like:

    <script type="text/javascript">document.addEventListener( 'wpcf7mailsent', function( event ) {
         fbq('track', 'Lead');
    }, false );</script>
    <script>document.addEventListener( 'wpcf7mailsent', function( event ) {
         ga('send', 'event', 'Contact Form', 'submit', 'Lead Enquiry');
    }, false );</script>

    and should look like:

    <script type="text/javascript">
         document.addEventListener( 'wpcf7mailsent', function( event ) {
              ga('send', 'event', 'Contact Form', 'submit', 'Lead Enquiry');
              fbq('track', 'Lead');
         }, false );</script>

    On your site there are two separate scripts and the tracking should be together in the same script block. This doesn’t look correct and can lead to problems with the JavaScript execution.

    Best regards from Spain.

    Hi,

    Thanks for your reply. This is because I have inserted Google Analytics Event Tracking in my site’s footer to show a Lead conversion very time a contact form gets submitted: https://prnt.sc/gv4xnn

    And then your plugin inserts the “fbq(‘track’, ‘Lead’);” part in the code (separately I guess).

    How can I resolve this then?
    I am running an important Facebook Ad campaign from tomorrow 10th Oct 2017 12 am IST (GMT + 5:30) and would appreciate a quick revert to solve any pixel attribution issues for my ad performance.

    Thanks,
    Tara

    Or do you think I can deactivate your plugin and simply add this line: “fbq(‘track’, ‘Lead’);” in the Footer of my site with the ga() function call as shown in the screenshot below? Will this make it work correctly? I am using the Head, Footer and Post Injections plugin on my site.

    Like this? https://prnt.sc/gv57rm

    Plugin Author apasionados

    (@apasionados)

    Hi Tara,

    Looking at the screenshot, you don’t really need our plugin. It’s easier to insert the fbq(‘track’, ‘Lead’); code in the footer together with the other code. Deactivate our plugin and insert the code in the footer.

    You code should look like:

    <script type="text/javascript">
         document.addEventListener( 'wpcf7mailsent', function( event ) {
              ga('send', 'event', 'Contact Form', 'submit', 'Lead Enquiry');
              fbq('track', 'Lead');
         }, false );
    </script>

    Exactly as you show in the second screenshot at https://prnt.sc/gv57rm

    Best regards from Spain.

    Thank you, I did what you said but now I can only see the PageView and SubscribedButtonClick events firing and not the Lead event on submitting the contact form on this page as shown here: https://snag.gy/yILbW3.jpg and https://snag.gy/i7pdCM.jpg

    Could you test and tell me what is wrong?
    if it helps, I am using the Pixel Caffeine plugin to insert the base Facebook pixel code on my site.

    Thanks,
    Tara

    Hi,

    I decided to use your plugin again, but this time – instead of me manually inserting code in my Header/Footer area, to use it for tracking both Google Analytics event and facebook Pixel Lead event like this: https://prnt.sc/gwe37f and https://prnt.sc/gwe3hc

    Now, the page source for https://chennaidreamhomes.com/contact/ looks like this: https://prnt.sc/gwe24y

    Still not working.
    Can you help?

    I use PixelCaffeine plugin to insert the Facebook base pixel code automatically but I find they use double quotes while recording the Page View: https://prnt.sc/gwe1kc. Could this be an issue? Since the fbq(‘track’,’Lead’); that your plugin uses is single quotes. Have asked their support team as well.

    Plugin Author apasionados

    (@apasionados)

    Hi there,

    For us right now everything looks ok. We just sent a test contact and the Facebook events were correctly recorded. Here you can see it: https://imgur.com/a/dfAAG

    We use the Facebook Pixel Helper extension in Google Chrome and it shows that everything Works correctly.

    How do you notice that it’s not working?

    P.D. Inserting the code directly should work out exactly the same as using our plugin.

    Best regards from Spain.

    Hi,
    Thanks for updating that it is working from your end (got your test email as well).

    It’s not working for me as I said earlier: I can only see 2 events:PageView and SubscribedButtonClick events firing and not the Lead event on submitting the contact form on this page as shown here: https://snag.gy/yILbW3.jpg

    Perhaps it’s a caching issue for me testing as ad admin? But I hve already cleared both cache plugins and my broser cache before testing with the Facebook Pixel Helper extension in Google Chrome.

    Plugin Author apasionados

    (@apasionados)

    Hi there,

    We really don’t know why you don’t see both events. As you can see in the screenshot for us it worked correcly. We really don’t know how to help as we can’t reproduce the problem on our side.

    Best regards from Spain.

    ok thank you 🙂

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘FB Pixel Lead Tracking not working properly’ is closed to new replies.