Woocommerce
WooCommerce is an open-source e-commerce plugin for WordPress. It is designed for small to large-sized online merchants using WordPress. Scaleo provides the ability to create the affiliate network for your WordPress+WooCommerce store and gives your affiliates all the tools to promote the products effectively.
Setting Up The Tracking
- 1
- Create an Offer the regular way in Scaleo.
- 2
- Select that Offer, go to Goals. Select Edit a Goal and scroll to Tracking Methods section.
- 3
- Select: Tracking Method > IMG Pixel. Copy that code.
- 4
- WooCommerce doesn't give the ability to enter tracking pixel via interface settings, so we need to edit the code manually.
- Please edit the following file:
-
wp-content/plugins/woocommerce/templates/checkout/thankyou.php
- if you have your custom theme, the file will be:
-
themes/{custom_theme_name}/woocommerce/checkout/thankyou.php
- find the line:
-
<?php do_action( 'woocommerce_thankyou', $order->id ); ?>
- add the copied pixel below this line and change the parameters to pass the order values to Scaleo:
-
- for CPA goal (pass Order ID):
<img src="https://yourcompany.scaletrk.com/track/img?goal_id=XXX&adv_order_id=<?php echo $order->id; ?>" height="1" width="1" />
- for CPS goal (pass Order Amount and Order ID):
<img src="https://yourcompany.scaletrk.com/track/img?goal_id=XXX&adv_order_id=<?php echo $order->id; ?>&amount=<?php echo ($order->order_total - $order->order_shipping); ?>" height="1" width="1" />
Note: Please make sure you change your Scaleo platform URL and Goal ID. You can also remove
goal_id
parameter entirely if you have just one Goal or you want default Goal to be converted.
Everything is set now. Affiliate can use Offer Tracking Link to drive the traffic to your WooCommerce store. Once the order will be placed, we will get the conversion into Scaleo platform and Affiliate will be credited.