WOMO Advertisers (brand owners) who use WooCommerce with their WordPress sites may use our integration method. This method requires technical knowledge; if you are not comfortable in making code changes to your site, please contact your developer or reach out to us for assistance.
Important: Install our click tracking scripts before our sales tracking scripts. Both scripts need to be installed properly for our system to track the visits and transactions from our affiliates.
*** Example only *** < script type="text/javascript" id="pap_xxxxxxd" src="https://platform.womo.ph/scripts/xxxxxxx"></ script> < script type="text/javascript"> PostAffTracker.setAccountId('default1'); try { PostAffTracker.track(); } catch (err) { } </ script>
Tip: if you are not a developer, we suggest you use the Insert Headers and Footers plugin for an easier and safer custom script implementation. If you still not comfortable adding our scripts even after downloading the plugin, please contact our help team.
1. After you’ve created and activated your child theme, please go ahead and grab a copy of your WooCommerce thankyou.php file. You can download it by accessing your WP installation via FTP or cPanel File Manager. To locate WC’s thankyou.php via FTP or cPanel, follow this path then download a copy of the file: /wp-content/plugins/woocommerce/templates/checkout/thankyou.php.
(Note: we recommend using a code text editor like Notepad++ or Sublime Text when adding custom codes. We also recommend an FTP solution like FileZilla.)
< ?php do_action( 'woocommerce_thankyou', $order->id ); ?>
3. Right below that line of code, add the following snippet: (Note: actual sales tracking snippet sent via email to advertisers).
*** Example only *** < script id="pap_xxxxxxd" src="https://platform.womo.ph/scripts/xxxxxx" type="text/javascript"> < script type="text/javascript"> PostAffTracker.setAccountId('xxxxxx'); var sale = PostAffTracker.createSale(); sale.setTotalCost('order_total - $order->order_shipping); ?>'); sale.setOrderID('id; ?>'); sale.setCurrency('get_order_currency(); ?>'); PostAffTracker.register(); </ script >
Please select the type of assistance you need help with the integration.