Add google Conversion-Tracking

This topic contains 2 replies, has 2 voices, and was last updated by  Manuel Hallauer 9 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #13108

    Hi Stephen
    I would like to add Google conversion tracking to the booking tool. Can you tell where (which Folder) in your plugin I have to add the Google code? Somewhere in the booking confirmation between <Body> and </Body>, but I couldn’t find the right folder.
    Thanks Manuel

    Manuel Hallauer
    #13115

    Hi Manuel,

    I’d recommend you don’t edit the plug-in’s files as these will be lost when you update.

    What you could do is inserted the code snippet after the “thank you” message, by adding the following code (either to a utility plug-in or your theme’s functions.php).

    add_filter( 'eventorganiser_pro_get_option_booking_complete_message', 'my_add_booking_conversion_snippet' );
    function my_add_booking_conversion_snippet( $message ){
    
        ob_start();
        ?>
    
            //Put JAVASCRIPT snippet here
    
        <?
        $snippet = ob_get_contents();
        ob_end_clean();
    
        $message = $message . $snippet;
    
        return $message;
    }

    In the next major update (1.9) you can select a page for the user to be redirected to after they place a booking. So you could create a page and add the code snippet to it. This version is currently in beta, but if you’d like to get hold of it then just let me know – I think it would be a simpler solution for you.

    Stephen Harris
    #13167

    Thanks a lot. I will wait for 1.9. as I am not in a hurry.

    Manuel Hallauer
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.