Support

Home Forums Event Espresso Premium Updating to EE 4.9.3.8.p – Conflicting with Facebook Event Code Pixel?

Updating to EE 4.9.3.8.p – Conflicting with Facebook Event Code Pixel?

Posted: May 18, 2017 at 12:59 pm

Viewing 17 reply threads


mpseminars

May 18, 2017 at 12:59 pm

Hello, after updating to 4.9.3.8.p, I now see the follow code at the very bottom of my checkout page: fbq(‘track’, ‘InitiateCheckout’);

This code was not there before I updated.

It appears that after I updated, I now see that code. Is it interfering with by Facebook event code which I have integrated through Google Tag Manager?

Thanks.


Josh

  • Support Staff

May 18, 2017 at 1:05 pm

May I ask which version of the Google tag manager plugin are you using?


mpseminars

May 19, 2017 at 9:11 am

Hi Josh,

I’m not using a Google Tag Manager plugin. Instead, I installed the Google Tag Manager code via functions that I put in my custom plugin. The code is below:
(I’ve removed the actual container ID).

// Add Google Tag Manager code in the <head> tag
add_action( 'wp_head', 'head_content', 5 );
function head_content() { ?>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','XXXXX');</script>
<!-- End Google Tag Manager -->
<?php }

// Add Google Tag Manager code immediately below opening <body> tag
add_action( 'genesis_before', 'google_analytics' );
function google_analytics() { ?>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=XXXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<?php }


Josh

  • Support Staff

May 19, 2017 at 9:20 am

So if you comment out the two lines of code that hook the functions to the web page:
// add_action( 'wp_head', 'head_content', 5 );
// add_action( 'genesis_before', 'google_analytics' );

Does the fbq(‘track’, ‘InitiateCheckout’); disappear or remain?


mpseminars

May 19, 2017 at 1:24 pm

When I comment out the two lines of code, fbq(‘track’, ‘InitiateCheckout’); disappears.


Josh

  • Support Staff

May 19, 2017 at 5:14 pm

Can you narrow down between the two which is the one that’s adding the visible code?


mpseminars

May 20, 2017 at 10:39 am

Hi Josh,

Yes, this is the code/function that’s adding the visible code:
add_action( 'wp_head', 'head_content', 5 );


Josh

  • Support Staff

May 22, 2017 at 8:37 am

Can you try a later priority? e.g:

add_action( 'wp_head', 'head_content', 20 );


mpseminars

May 22, 2017 at 6:49 pm

Hi Josh,

That method didn’t work.


Josh

  • Support Staff

May 22, 2017 at 7:20 pm

Do you mean setting it to a later priority didn’t fix your issue? Is there somewhere I can download a copy of your Genesis Child theme so we can troubleshoot?


mpseminars

May 25, 2017 at 10:40 am

Yes, setting it to a later priority didn’t fix my issues.
What’s the best way to send you the Genesis Child Theme?


Josh

  • Support Staff

May 25, 2017 at 1:30 pm

You can email a zip file to support at eventespresso.com or upload the theme to a dropbox public folder (or similar) and send us the link.


mpseminars

June 2, 2017 at 12:34 pm

Hi Josh,

Do you need just the theme, or all of the plugins as well?


Tony

  • Support Staff

June 2, 2017 at 2:11 pm

If the theme and the above code is all that is needed to reproduce then that’s all we need, so really it depends on which plugins you are referring to.

We can start with the theme and then request the plugins if needed.


mpseminars

June 3, 2017 at 2:37 pm

Ok I just sent an email with a download link to your support email. Thank you.


Josh

  • Support Staff

June 6, 2017 at 12:43 pm

It appears that the theme and custom plugin code you sent isn’t what’s directly adding the code at the bottom of your webpage. Can you try temporarily deactivating the other plugins on the site? It looks like the script might be output by a scroll tracking plugin or by a Zopim chat plugin.


mpseminars

June 19, 2017 at 9:21 am

Hi Josh,

I deactivated all of my plugins except the event espresso ones, which are:

– Event Espresso
– Event Espresso – Ticketing (EE4+)
– Event Espresso – Flexible Payment Method (EE 4.6+)
– Customizations for Event Espresso

The code still displays, so it didn’t solve the issue. Any other ideas?

Thanks.


mpseminars

June 19, 2017 at 9:27 am

I removed my Google Tag Manager code and it fixed the problem. I’m going to check my tags that are set up inside GTM. That is where the Live Chat and Scroll tracking is set up. Thanks for your help.

Viewing 17 reply threads

The support post ‘Updating to EE 4.9.3.8.p – Conflicting with Facebook Event Code Pixel?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso