Title: Conversion value sending
Last modified: June 27, 2017

---

# Conversion value sending

 *  [xmp333](https://wordpress.org/support/users/xmp333/)
 * (@xmp333)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/conversion-value-sending/)
 * 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ì](https://wordpress.org/support/users/antoscarface/)
 * (@antoscarface)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/conversion-value-sending/#post-9265218)
 * 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](https://snag.gy/67gCPF.jpg)
 *  Thread Starter [xmp333](https://wordpress.org/support/users/xmp333/)
 * (@xmp333)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/conversion-value-sending/#post-9265240)
 * 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ì](https://wordpress.org/support/users/antoscarface/)
 * (@antoscarface)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/conversion-value-sending/#post-9268986)
 * 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.wordpress.org/plugin/pixel-caffeine.zip](https://downloads.wordpress.org/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.
    -  This reply was modified 8 years, 11 months ago by [Antonino Scarfì](https://wordpress.org/support/users/antoscarface/).
 *  Thread Starter [xmp333](https://wordpress.org/support/users/xmp333/)
 * (@xmp333)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/conversion-value-sending/#post-9269796)
 * 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ì](https://wordpress.org/support/users/antoscarface/)
 * (@antoscarface)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/conversion-value-sending/#post-9269977)
 * 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.
    -  This reply was modified 8 years, 11 months ago by [Antonino Scarfì](https://wordpress.org/support/users/antoscarface/).

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

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

 * ![](https://s.w.org/plugins/geopattern-icon/pixel-caffeine_e2ce0c.svg)
 * [Pixel Caffeine](https://wordpress.org/plugins/pixel-caffeine/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pixel-caffeine/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pixel-caffeine/)
 * [Active Topics](https://wordpress.org/support/plugin/pixel-caffeine/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pixel-caffeine/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pixel-caffeine/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Antonino Scarfì](https://wordpress.org/support/users/antoscarface/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/conversion-value-sending/#post-9269977)
 * Status: not a support question