Wondering what is Sift science ? have a look at there website https://siftscience.com/
Wordering what is WooCommerce ? have a look at this page https://wordpress.org/plugins/woocommerce/
Using Sift science with WooCommerce can significantly reduce charge backs but unfortunately at the time of writing this article Sift science don’t have any plugin for WooCommerce. This read will help you integrate Sift science with WooCommerce.
Before we start
Make sure you have installed WordPress and WooCommerce for WordPress. Also registered for an account with Sift science.
You will also need to install Code Snippets plugin for WordPress. You can get the plugin from here https://wordpress.org/plugins/code-snippets/
Code Snippets is an easy, clean and simple way to add code snippets to your site. It removes the need to add custom snippets to your theme theme’s functions.php file.
Little bit of theory
Sift science has a very nice integration guide here https://siftscience.com/resources/guides/chargebacks do not proceed if you still haven’t read this integration guide. Take a break here go to this URL and read it once you are familiar with the integration process come back and continue this read.
Completely optional if you to read about WordPress’s functions.php file https://codex.wordpress.org/Functions_File_Explained
Lets dive into it.
Sift science charge back integration has 4 parts User Activity, Checkout, Decision and Feedback. This page has more information https://siftscience.com/resources/guides/chargebacks
we will start with Tracking User Activity. https://siftscience.com/resources/guides/chargebacks#js-snippet
now insert this snippet key in your java-script snippet
Creating a WordPress Code Snippet and populating _user_id and _session_id
click “Add New” in Snippets Menu and enter the name of your snippet, the WordPress Code snippet and make sure to select radio option “Only run on site front-end”
you can copy the WordPress snippet from the following gist
do not forget to save and activate your WordPress snippet.
If you are having hard time understanding this WordPress snippet leave a Comment I will try to explain it.
At this point if you have followed everything correctly your WooCommerce site should have started sending page views to Sift science.
Next we will send Logout, Login and Create Account Activity to Sift science.