Support

Home Forums Event Espresso Premium EE Bookings and Google Analytics

EE Bookings and Google Analytics

Posted: August 12, 2020 at 11:18 am


SteveMBragg

August 12, 2020 at 11:18 am

I am trying to get EE to record sales of booking in the Ecommerce section of Google Analytics.

I have followed the advice here to create a plugin:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

I have then added this code from Loenzo from here: https://eventespresso.com/topic/adding-adwords-conversion-code-to-payment_overview-php/

The code I have used is:

add_action( ‘wp_footer’, ‘wpsites_add_tracking_code’ );
function wpsites_add_tracking_code() {
if ( is_page(‘thank-you’) ) {
echo'<div class=”tracking-code”>add your tracking code for google here</div>’;
}
}

However the plugin does not show so I cannot activate it.

I have put the above code in the functions.php file for the moment but the theme updates will remove this each time.

Can you help please?

Kind regards

Steve


Tony

  • Support Staff

August 12, 2020 at 12:24 pm

Hi Steve,

Please post the full contents of the plugin you created to something like PasteBin and add the URL for it here so we can review it.


SteveMBragg

August 13, 2020 at 8:16 am

I have done so and the URL is:

https://pastebin.com/56ACQTup

Steve


Tony

  • Support Staff

August 14, 2020 at 4:33 am

Hi Steve,

Your custom functions plugin shows up for me:

https://monosnap.com/file/Oino4kk8tR94sTBieEXbSB6fG6s8R8

All I’ve done there is create a steve-plugin-test directory, then a steve-plugin-test.php file and added the code above. That shows up in my plugin list here: https://monosnap.com/file/pOhqdFDj8EcHGiuGZ7hfJhzMwqNimS

Double-check your file is set to be .PHP and not .txt (or even no extension)

I can email you a copy of the zip if you prefer?


SteveMBragg

August 14, 2020 at 5:56 am

Tony

The problem is not that the plugin does not show in the folder when looking at the folder via FTP.

The problem is that the plugin does not show in the WordPress dashboard for me to then activate.

The file is definately php and is name as this:

ee-analytics.php

What is inside the file is the script as I have shown you, but it does not show up in the WP Plugin dashboard.

Permissions are as per other plugins, including your own EE plugin.

Steve


Tony

  • Support Staff

August 14, 2020 at 6:43 am

The problem is not that the plugin does not show in the folder when looking at the folder via FTP.

The problem is that the plugin does not show in the WordPress dashboard for me to then activate.

Yeah, I understand. That’s why I showed both the directory and plugin list above.

Try installing THIS through Dashboard -> Plugins -> Add new -> Upload plugin

Does it show then?

Note you’ll need to remove your current version first


SteveMBragg

August 14, 2020 at 7:01 am

Hi Tony

I had to zip the file up of course and then it allowed me to upload the plugin, THEN it spotted the original faile and asked me to allow that to be installed this time and then allowed me to activate the plugin.

Weird.

So now that is activated is there somewhere where I can see how to use this to track bookings?

Thanks

Steve


Tony

  • Support Staff

August 14, 2020 at 7:21 am

I had to zip the file up of course and then it allowed me to upload the plugin

It’s already a zip? Unless your browser is auto extracting them, which if its a mac it will be.

THEN it spotted the original faile and asked me to allow that to be installed this time and then allowed me to activate the plugin.

Not sure what is going on there, that doesn’t make any sense.

So now that is activated is there somewhere where I can see how to use this to track bookings?

Sorry, I’m not sure I follow.

Your adding custom code to track the bookings, so there’s nowhere within EE to do it if that’s what you mean?


SteveMBragg

August 14, 2020 at 8:22 am

Actually the code came from EE. I thought the post I read was authored by you but perhaps it it was Lorenzo.

The post was about how to analyse EE’s sales results from the Thank you page.

That’s why I asked for more info.

Steve


Tony

  • Support Staff

August 14, 2020 at 8:47 am

The code isn’t from EE, Lorenzo simply copied it from the link he provided in the other thread you linked to which is here:

https://wpsites.net/wordpress-tips/tracking-code-specific-page/

The code itself is just a method of adding Google Analytics code onto the page, how you monitor that is outside the scope of Event Espresso support. The threads linked to are just trying to help point people in the right direction for setting it up themselves through Google Adwords with how to add the tracking code.

So, I can’t give you more info as it isn’t a feature we provide/support ourselves.


SteveMBragg

August 14, 2020 at 9:53 am

Oh. OK.

Steve

The support post ‘EE Bookings and Google Analytics’ 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