• Hi,

    I’m using Adespresso along with this plugin in my e-com store.
    However, as all relevant events – ViewContent, AddToCart, InitiateChekcout and Purchase are sending conversion values, that messes up Adespresso ROI measurement.

    Could you please add an option to turn off conversion value sending for specific event types? This would help a ton all Adespresso users who are on WooCommerce.

    While this gets added (I hope), can you help me out, how to edit the plugin to turn off value sending for all events except for ‘Purchase’?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Antonino Scarfì

    (@antoscarface)

    Hi,

    you should be already able to do that in General Settings, from the bottom box dedicated to “Conversions” settings, here the screenshot: https://snag.gy/67gCPF.jpg

    Thread Starter xmp333

    (@xmp333)

    Hi,

    no, that is for turning off event tracking.

    What I’d like to do is to turn off the conversion value sending.
    In other words, I need to exclude ‘value’ parameter to be sent EXCEPT for the ‘Purchase’ event.
    The reason is, Adespresso counts all these values and the ROI of the campaigns will be off.

    Plugin Author Antonino Scarfì

    (@antoscarface)

    Hi,

    oh, ok I understand. Sorry for the misunderstanding.

    So, with the actual version you can’t, but I did a change in the plugin to add a filter where you can hook on it and customize the events by code. So the steps are two:

    • Download the dev version where I committed the change and install it manually. Download it from here: https://downloads.wp.xz.cn/plugin/pixel-caffeine.zip
    • Add this code in the functions.php of your active theme:
      
      add_filter( 'aepc_track_event_data', function( $data, $event ){
      	if ( in_array( $event, array( 'Purchase' ) ) ) {
      		$data = array();
      	}
      
      	return $data;
      }, 10, 2 );
      

    In this way, you should have Purchase pixel fired without any data inside. I hope it can help you.

    Thread Starter xmp333

    (@xmp333)

    Hi,

    I really appreciate your effort, but I think there is still some misunderstanding.
    What you mean to do is to strip all parameters from the ‘Purchase’ event, however I need to strip some parameters from all other events.
    So let me be very clear and write down EXACTLY what parameters I’d like to pass to Facebook. 🙂

    ViewContent; AddToCart; InitiateCheckout:

    • content_type
    • content_ids
    • content_name
    • content_category

    Purchase:
    – content_type
    – content_ids
    – content_name
    – content_category
    – value
    – currency

    So as you can see, I only want to send conversion value in the case of the ‘Purchase’ event.

    Sorry, I can’t be more specific than that. 🙂

    Is it possible to do this?

    Plugin Author Antonino Scarfì

    (@antoscarface)

    Okay, sorry again, it was been difficult to understand! 😀

    So, it is always valid the change in the plugin I did previously, so install anyway that version of the plugin I told you in the previous reply and use this code in functions.php instead of the previous one:

    
    add_filter( 'aepc_track_event_data', function( $data, $event ){
    	if ( ! in_array( $event, array( 'Purchase' ) ) ) {
    		unset( $data['params']['value'] );
    		unset( $data['params']['currency'] );
    	}
    
    	return $data;
    }, 10, 2 );
    

    It should remove the parameters ‘value’ and ‘currency’ only when the event is not Purchase, so it should maintain that parameters from Purchase event and remove them from the other events.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Conversion value sending’ is closed to new replies.