WordPress with WooCommerce Integration WOMO

WordPress + WooCommerce

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.

Step 1: Add our click tracking scripts to your website.

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.

Install our click tracking scripts on all pages of your website. We recommend you place the click tracking scripts on the footer of your website. (As our partner Advertiser, you should have received our click tracking and sales tracking scripts via email. However, if you need it again, please contact our help team.)
*** Example only ***

< script type="text/javascript" id="pap_xxxxxxd" src="https://platform.womo.ph/scripts/xxxxxxx"></ script>
< script type="text/javascript">
try {
} 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.

Step 2: Add our sales tracking scripts to your thank you page.

Important: We highly recommend you create a child theme before you make any code changes to your WooCommerce thank you page. A child theme protects your site from losing custom codes when WordPress and plugins like WooCommerce pushes an update. If you don’t have access to a developer or don’t know have to create a child theme, please contact our help team for assistance.

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.)


2. In your new copy of the file, look for this line of code:
< ?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">

var sale = PostAffTracker.createSale();
sale.setTotalCost('order_total - $order->order_shipping); ?>');
sale.setOrderID('id; ?>');
sale.setCurrency('get_order_currency(); ?>');
</ script >
4. Save the file as thankyou.php

5. On your FTP or File Manager, navigate to: /wp-content/themes/[your child theme], then create a new folder and name it ‘woocommerce’, inside that folder create a sub-folder and name it ‘checkout’. Finally, inside the sub-folder, save your new thankyou.php file.

Your structure should look like the following: /wp-content/themes/[your child theme]/woocommerce/checkout/thankyou.php

Warning: if you are using plugins that amends WooCommerce’s original template structure, such as Cartflows, the implementation would be slightly different. You’ll have to place the new thankyou.php file in your new plugin folders. As this may vary per website, we suggest you contact our help team.
If your checkout page uses a Paypal Module, there may be additional custom implementation needed to complete the installation of our sales tracking scripts. In cases like this, please contact our help team.

Step 3: Do a test purchase.

We want to make sure the installation is perfect! The best way for us to know is make a purchase using a test affiliate link. This step is down on our side. So please make sure you reach out to us once you are finished installing our click and sales tracking scripts so we can conduct a test. We may have to do more than one test purchase to ensure everything is working as intended.

When you’re done with the integration, please contact our help team. Please select ‘Please conduct the test purchase’.
We also offer integration services for Advertisers who don’t have access to developers or can’t do the installation themselves. Our basic integration service starts at $99. Please contact our help team for more details.

Advertiser signup form

Please complete the form below and a WOMO business representative will get in touch with you. Thanks!

Integration Assistance Needed

Please select the type of assistance you need help with the integration.