IMPORTANT *It is not recommended that you try to complete this setup without instruction from the Everflow team or from your dev team. Failure to place the code directly could result in your whole website going down.


Step #1

Click Script

For the click setup, please add the header and footer plugin found here.

In the Everflow JS SDK section on the offer page, copy the Click code and paste it into the Footer.

You can get to the Footer section inside the Header and Footer plugin by going to Settings > Header and Footer Scripts in your Wordpress account:

Step #2

Conversion Script

Prepare your conversion script.

add_action( 'woocommerce_thankyou', 'my_custom_tracking' );

function my_custom_tracking( $order_id ) {
// Lets grab the order
$order = wc_get_order( $order_id );

// Determine if any coupons were used for this transaction
$coupons = "";
$couponCount = 0;
foreach ($order->get_used_coupons() as $coupon) {
$couponCount++;
if($couponCount > 1) { // do not add comma unless more than one coupon
$coupons .= ',';
}
$coupons .= $coupon;
}

$javascriptCode = '<script type="text/javascript" src="https://INSERT_TRACKING_DOMAIN/scripts/sdk/everflow.js"></script>
<script type="text/javascript">
EF.conversion({
aid: INSERT_ADVERTISER_ID,
amount: '.($order->get_total() - $order->get_shipping_total()).',
order_id: "'.$order_id.'",
coupon_code: "'.$coupons.'",
adv1: "", //Optional
adv2: "", //Optional
adv3: "", //Optional
adv4: "", //Optional
adv5: "", //Optional
email: "'.$order->billing_email.'",
});
</script>';

echo $javascriptCode;
}

Replace INSERT_ADVERTISER_ID with the Advertiser ID. The Advertiser ID can be located under Offers - Manage > Click the Offer - General card.

From the example above you would use 31 in that spot.

Please replace INSERT_YOUR_TRACKING_DOMAIN with the tracking domain found under Offers - Manage > Click the Offer - Tracking card:

In the example above, the domain is: http://tracking2-test.eflow.team

Step #3

After you have completed Step #2, create your functions.php URL (so you can edit the page).

Copy your store domain. In this example, the domain is: https://www.ef-wp-test.com

Once you successfully navigate to that URL, scroll to the bottom of the page and input the code, like this:

Click Update File at the bottom of the screen:


Refunds

To set up refund tracking with WooCommerce, you must have your Consumer Key and Consumer Secret. To access, navigate to the Advanced tab inside WooCommerce.

Click Add key.

Enter a Description and User, and select Read/Write under Permissions.

Finally, the Consumer key, Consumer secret and QRCode are available.

For reporting, navigate to Reporting - Refunds. For more information - [Click Here]


NEED HELP? OUR CUSTOMER SUCCESS TEAM IS HERE FOR YOU!

We've assembled a superstar team of industry veterans that are available around the clock to make sure that your issues are resolved and questions are answered. You can reach out any time in-platform via Chat or by emailing support@everflow.io.

Did this answer your question?