WooCommerce Integration
Connect your WooCommerce store with REST API for server-side tracking plus unified SDK for all pixels.
WooCommerce powers millions of online stores. AdsMAA provides dual-track WooCommerce integration: server-side REST API/webhooks for accurate order data, plus our Unified SDK for client-side pixel tracking.
Why Connect WooCommerce?
Complete Store Visibility
| Feature | What You Get |
|---|---|
| Order Import | All orders synced with full details |
| Customer Profiles | Purchase history and behavior |
| Product Analytics | Best sellers, trends, inventory |
| Revenue Attribution | Connect ads to actual sales |
| Refund Tracking | See true net revenue |
Setup Guide
Step 1: Enable REST API
- Go to WooCommerce ā Settings ā Advanced
- Click REST API
- Click Add key
Step 2: Create API Credentials
Fill in the form:
| Field | Value |
|---|---|
| Description | AdsMAA Integration |
| User | Your admin user |
| Permissions | Read |
Click Generate API key
Step 3: Copy Credentials
You will see:
| Credential | Format |
|---|---|
| Consumer Key | ck_xxxxxxxxxxxxxxxxxxxxxxxx |
| Consumer Secret | cs_xxxxxxxxxxxxxxxxxxxxxxxx |
Copy both immediately - secret shown only once!
Step 4: Connect in AdsMAA
- Go to Integrations ā Tracking & E-commerce
- Find WooCommerce card
- Click Connect
- Enter your credentials:
| Field | What to Enter |
|---|---|
| Site URL | https://yourstore.com |
| Consumer Key | ck_xxxxx |
| Consumer Secret | cs_xxxxx |
- Click Connect
What Gets Synced
Orders
| Field | Description |
|---|---|
| Order ID | WooCommerce order number |
| Status | Pending, processing, completed, etc. |
| Customer | Email and billing details |
| Line Items | Products with quantities and prices |
| Totals | Subtotal, tax, shipping, discounts |
| Payment | Payment method used |
| Dates | Created, modified, completed |
Customers
| Field | Description |
|---|---|
| Customer ID | WooCommerce customer ID |
| Hashed for privacy | |
| Name | First and last name |
| Orders | Total order count |
| Spent | Total lifetime value |
| Location | Country and region |
Products
| Field | Description |
|---|---|
| Product ID | WooCommerce product ID |
| Name | Product title |
| SKU | Stock keeping unit |
| Price | Current price |
| Stock | Inventory quantity |
| Categories | Product categories |
Adding Tracking Code
Option 1: Insert Headers Plugin
- Install "Insert Headers and Footers" plugin
- Go to Settings ā Insert Headers and Footers
- Add to Header section:
****`html
<script> (function(w,d,s,o,f,js,fjs){ w['AdsMAA']=o;w[o]=w[o]||function(){(w[o].q=w[o].q||[]).push(arguments)}; w[o].l=1*new Date();js=d.createElement(s);fjs=d.getElementsByTagName(s)[0]; js.async=1;js.src=f;if(fjs&&fjs.parentNode)fjs.parentNode.insertBefore(js,fjs); }(window,document,'script','adsmai','https://cdn.adsmai.com/sdk.js')); adsmai('init', 'YOUR_API_KEY'); adsmai('pageview'); </script>****`
Option 2: Theme Functions
Add to functions.php:
****`php add_action('wp_head', function() { ?>
<script> (function(w,d,s,o,f,js,fjs){ w['AdsMAA']=o;w[o]=w[o]||function(){(w[o].q=w[o].q||[]).push(arguments)}; w[o].l=1*new Date();js=d.createElement(s);fjs=d.getElementsByTagName(s)[0]; js.async=1;js.src=f;if(fjs&&fjs.parentNode)fjs.parentNode.insertBefore(js,fjs); }(window,document,'script','adsmai','https://cdn.adsmai.com/sdk.js')); adsmai('init', 'YOUR_API_KEY'); adsmai('pageview'); </script> <?php }); ****` --- ## Troubleshooting ### Connection Issues | Issue | Solution | |-------|----------| | "Unauthorized" error | Check consumer key/secret are correct | | "Site not found" | Verify URL includes https:// | | SSL error | Ensure SSL certificate is valid | | Timeout | Check server allows external API access | ### Sync Issues | Issue | Solution | |-------|----------| | Orders missing | Check API user has read permissions | | Old data only | Initial sync takes time; wait 30 minutes | | Duplicate orders | Check webhook configuration | ### WordPress Hosting Notes | Host | Notes | |------|-------| | WP Engine | May need to whitelist API endpoints | | Cloudflare | Disable "I'm Under Attack" mode for API | | Shared hosting | May have rate limits | --- ## Recap Here is what you learned: - **Connect via REST API** - Secure authentication with consumer keys - **Orders and customers sync** - Complete e-commerce data - **Add tracking code** - Via plugin or theme - **Works with any host** - Standard WordPress REST API WooCommerce integration brings your store data into AdsMAA for unified analytics. **Next step:** [Set up conversion tracking](/docs/tracking/conversion-tracking) to attribute sales to campaigns.Key Takeaways
- 1REST API + Webhooks for server-side order tracking
- 2Unified SDK auto-loads Meta Pixel, GA4, Clarity
- 3Complete dual-track architecture
- 4Works with any WordPress host
Frequently Asked Questions
Does this work with WooCommerce plugins?
What WordPress version is required?
Can I sync multiple WooCommerce stores?
Was this article helpful?
Continue Reading
Shopify Integration
Connect your Shopify store with webhooks for server-side tracking plus unified SDK for client-side pixels.
integrationsUnified JavaScript SDK
One SDK for all platforms. Auto-loads Meta Pixel, GA4, and Clarity based on your connected integrations.
trackingConversion Tracking Deep Dive
Understand how server-side tracking works and why it captures 2x more data than browser pixels.