WooCommerce Data Export to Cogny
Export WooCommerce data to BigQuery for AI-powered analytics. Unlock insights on customer behavior, product performance, and revenue optimization.
WooCommerce Data Export to Cogny
TL;DR
Export WooCommerce data to BigQuery for AI-powered analytics on customer lifetime value, product performance, and channel attribution—no manual exports required.
What you'll accomplish:
- Connect WooCommerce to BigQuery using ETL connector plugin
- Automatically sync orders, customers, and products daily
- Enable AI analysis identifying which traffic sources bring repeat customers
- Discover product combinations predicting high lifetime value
- Analyze cart abandonment patterns by traffic source
Time required: 25 minutes | Difficulty: Intermediate | Prerequisites: WordPress site with WooCommerce, admin access, Google Cloud account, Cogny account
Quick Start: Install WooCommerce BigQuery connector plugin (or use Fivetran/Stitch) → Configure authentication → Set daily sync schedule → Connect BigQuery to Cogny.
Related Resources
Essential guides for WooCommerce data analysis:
- BigQuery Connection Guide - Connect WooCommerce data in BigQuery to Cogny
- CAC Analysis with AI - Calculate true customer acquisition cost using WooCommerce LTV data
- Shopify + Cogny Integration - Similar e-commerce integration pattern for Shopify stores
Question
How do I connect WooCommerce to Cogny for AI-powered e-commerce analytics?
Answer
Export WooCommerce data to BigQuery using a connector plugin or ETL tool. Connect BigQuery to Cogny. AI analyzes your orders, customers, and products to find growth opportunities.
No manual exports. No spreadsheets. Just automatic insights.
Quick Tip: Export historical order data first to build baseline metrics before automating ongoing syncs. Starting with 12 months of data gives AI enough signal for seasonal pattern analysis.
Why Connect WooCommerce?
WooCommerce gives you reports. Orders. Revenue. Top products.
But it doesn't tell you:
- Which traffic source brings customers who actually come back?
- What's your true CAC when you factor in returns and refunds?
- Which product combinations predict high lifetime value?
- How do abandoned carts differ by traffic source?
Cogny's AI finds these patterns automatically.
What You'll Get
After connecting WooCommerce:
Customer lifetime value analysis Segment customers by LTV and find what high-value customers have in common
Product intelligence Which products drive repeat purchases vs. one-time buys
Channel attribution Multi-touch path analysis across all marketing channels
Cart abandonment insights Why people leave and which abandoned carts to prioritize
Inventory optimization What to stock more, what to discontinue, based on LTV impact
Note: Unlike Shopify, WooCommerce requires a third-party plugin or custom export script. We recommend the BigQuery WordPress plugin for automated syncing or Fivetran for production reliability.
Prerequisites
You need:
- WordPress site with WooCommerce (any hosting)
- WooCommerce admin access
- Google Cloud account (free tier works)
- Cogny account (for AI analysis)
Step 1: Choose Your Export Method
Three options:
Option A: Plugin-Based Export (Easiest)
- Install WordPress plugin
- Configure BigQuery credentials
- Automatic sync
Best for: Non-technical users, smaller stores (<10K orders/month)
Option B: ETL Service (Recommended)
- Use Fivetran or Airbyte
- More reliable
- Better for scale
Best for: Growing stores, agencies, multiple sites
Option C: Custom API Export (Advanced)
- Use WooCommerce REST API
- Build custom sync script
- Most control
Best for: Developers, custom requirements
This guide covers Option B (Fivetran) - most reliable for production use.
Time: 1 minute to decide
Step 2: Set Up Google Cloud Project
Go to console.cloud.google.com
Click Select a project → New Project
Name: woocommerce-analytics
Click Create
Google gives you $300 in free credits.
Time: 2 minutes
Step 3: Enable BigQuery API
In Google Cloud Console, search for "BigQuery API"
Click Enable
Wait for activation (usually 30 seconds).
Time: 1 minute
Step 4: Create BigQuery Dataset
Go to console.cloud.google.com/bigquery
Click your project name in Explorer panel.
Click ⋮ (three dots) → Create dataset
Dataset ID: woocommerce
Location: Choose region
- US stores:
us(multi-region) - EU stores:
eu(multi-region) - Other: Select closest region
Click Create Dataset
Time: 2 minutes
Step 5: Set Up Fivetran Connector
Go to fivetran.com
Sign up (free trial available).
Click + Connector
Search for "WooCommerce"
Click WooCommerce connector.
Time: 2 minutes
Step 6: Configure WooCommerce Connection
Get WooCommerce API credentials:
In WordPress admin:
Go to WooCommerce → Settings → Advanced → REST API
Click Add key
Description: Fivetran BigQuery Sync
User: Select admin user
Permissions: Read
Click Generate API Key
Copy:
- Consumer Key:
ck_xxxxxxxxxxxxxxx - Consumer Secret:
cs_xxxxxxxxxxxxxxx
IMPORTANT: Save these now. They won't be shown again.
Time: 3 minutes
Enter credentials in Fivetran:
Back in Fivetran setup:
Shop URL: https://yourstore.com
Consumer Key: Paste ck_...
Consumer Secret: Paste cs_...
Historical sync: Choose how far back to sync
- Recommended: 12 months (for seasonal analysis)
- Minimum: 3 months (for basic insights)
Click Save & Test
Fivetran tests connection.
If successful: ✅ "Connection successful"
If failed: Check URL, verify API keys, confirm WooCommerce version is 3.0+
Time: 3 minutes
Step 7: Configure BigQuery Destination
Create service account for Fivetran:
In Google Cloud Console:
Go to IAM & Admin → Service Accounts
Click Create Service Account
Name: fivetran-woocommerce-sync
Description: Fivetran connector for WooCommerce data
Click Create and Continue
Grant role: BigQuery Data Editor
Click Continue → Done
Time: 3 minutes
Create JSON key:
Click the service account you just created.
Go to Keys tab.
Click Add Key → Create new key
Key type: JSON
Click Create
JSON file downloads automatically.
Time: 1 minute
Configure in Fivetran:
In Fivetran destination settings:
Destination type: BigQuery
Project ID: Your Google Cloud project ID (e.g., woocommerce-analytics-123456)
Dataset location: Same region you chose in Step 4
Service account JSON: Upload the downloaded JSON file
Click Save & Test
Time: 2 minutes
Step 8: Start Initial Sync
Click Start Initial Sync in Fivetran.
What gets synced:
- Orders: Every order and status
- Order items: Line items (products in each order)
- Customers: Customer details and history
- Products: Full catalog with variations
- Coupons: Discount code usage
- Refunds: Return and refund data
- Order notes: Customer and admin notes
- Tax and shipping: Transaction details
Sync duration:
- Small store (<1,000 orders): 15-30 minutes
- Medium store (1K-10K orders): 1-3 hours
- Large store (10K-50K orders): 4-8 hours
- Very large (50K+ orders): 8-24 hours
You'll get email notification when complete.
Time: Varies (but you can proceed while syncing)
Step 9: Verify Data in BigQuery
While sync runs, check BigQuery.
Go to console.cloud.google.com/bigquery
Expand your project → woocommerce dataset.
Tables appear as sync progresses:
ordersorder_itemscustomersproductsproduct_variationscouponsrefundsorder_notes
Click a table → Preview tab → See your data.
Time: 2 minutes
Step 10: Connect BigQuery to Cogny
Follow our BigQuery Connection Guide. Once connected, you can run AI-powered CAC analysis to optimize your acquisition spend.
Quick steps:
- Create service account for Cogny
- Grant BigQuery Data Viewer role
- Download JSON key
- In Cogny: Add Data Source → BigQuery
- Upload JSON key
- Select
woocommercedataset
Time: 5 minutes
Step 11: Let AI Analyze
Cogny's AI immediately:
Maps your schema (5-10 minutes)
- Identifies tables and relationships
- Connects orders → customers → products
- Builds data model
Analyzes historical patterns (1-24 hours)
- Customer behavior trends
- Product performance
- Channel effectiveness
- Seasonal patterns
Generates recommendations (ongoing)
- Specific optimizations
- Product insights
- Pricing strategies
- Inventory guidance
What's in Your WooCommerce Data?
Orders table:
Every purchase.
Key fields:
id- Order IDstatus- pending, processing, completed, refunded, failedcurrency- USD, EUR, etc.total- Order totaltotal_tax- Tax amountshipping_total- Shipping costdiscount_total- Discounts appliedcustomer_id- Who orderedbilling_email- Customer emaildate_created- Order timestampdate_paid- Payment timestamppayment_method- Gateway usedtransaction_id- Payment transaction ID
Order_items table:
Individual products in each order.
Key fields:
order_id- Which orderproduct_id- Which productvariation_id- Product variation (size, color, etc.)quantity- How manysubtotal- Item subtotaltotal- Item total (after discount)tax_total- Tax on item
Customers table:
Everyone who's ordered.
Key fields:
id- Customer IDemail- Email addressfirst_name,last_name- Nameusername- WP usernamedate_created- First order dateorders_count- Total orderstotal_spent- Lifetime valueavatar_url- Profile image
Products table:
Your catalog.
Key fields:
id- Product IDname- Product nameslug- URL slugtype- simple, variable, grouped, etc.status- publish, draft, privateprice- Current priceregular_price- Non-sale pricesale_price- Sale pricecategories- Product categoriestags- Product tagsstock_status- instock, outofstock, onbackorder
Example AI Insights
1. High-LTV Customer Acquisition Sources
AI finds: "Customers from organic search:
- Average first order: $67
- 6-month LTV: $312
- Repeat purchase rate: 47%
Customers from Facebook ads:
- Average first order: $89
- 6-month LTV: $148
- Repeat purchase rate: 18%
Organic customers are 2.1x more valuable long-term."
Recommendation: "Invest more in SEO and content. Reduce Facebook prospecting budget. Focus Facebook on retargeting."
2. Product Bundle Opportunities
AI finds: "Product A and Product B are purchased together in separate orders by 340 customers within 30 days. Average gap between purchases: 18 days. Combined: $127 revenue per customer.
If bundled with 10% discount:
- Estimated take rate: 65%
- Revenue per bundle: $114
- But single transaction = better experience, lower support, higher satisfaction."
Recommendation: "Create 'A + B Complete Kit' bundle. Expected: 220 bundles/month, +$25K revenue."
3. Abandoned Cart Analysis by Source
AI finds: "Cart abandonment rate by source:
Google Ads: 72% abandonment
- High cart value ($142 avg)
- Abandon at shipping cost step
- Issue: Unexpected shipping fees
Organic: 64% abandonment
- Medium cart value ($87 avg)
- Abandon at account creation
- Issue: Forced registration
Email campaigns: 48% abandonment
- Warm traffic, high intent
- Abandon at payment step
- Issue: Limited payment options"
Recommendation:
- Show shipping costs earlier for paid traffic
- Enable guest checkout
- Add more payment methods (Apple Pay, PayPal)
Expected impact: 8-12% increase in conversions
4. Discount Strategy Impact
AI finds: "Customers who use 25%+ discount on first order:
- Higher initial AOV ($98 vs $72)
- BUT: 63% lower repeat rate
- 12-month LTV: $118
Customers with no discount:
- Lower first order ($72)
- 52% make second purchase within 90 days
- 12-month LTV: $267
Discounts attract bargain hunters, not loyal customers."
Recommendation: "Replace first-order discounts with loyalty program. Offer 10% on second purchase instead. Expected LTV increase: 35%."
Combining WooCommerce with Marketing Data
Connect these for full picture:
- WooCommerce (orders, LTV)
- Google Ads (acquisition cost, ad performance)
- Meta Ads (social creative effectiveness)
- GA4 (website behavior, funnel analysis)
What this enables:
True ROI by channel:
"Google Shopping:
- Ad spend: $12,400/month
- Orders: 187
- Revenue: $23,800
- But: Returns + refunds: $3,200
- True profit: $8,200
- ROI: 66%
Facebook Prospecting:
- Ad spend: $8,900/month
- Orders: 142
- Revenue: $18,400
- Returns + refunds: $5,100
- True profit: $4,400
- ROI: 49%"
Recommendation: "Shift budget from Facebook to Google Shopping."
Multi-touch attribution:
"Customer journey for high-LTV customers:
- See Facebook ad (awareness)
- Google search → organic result (research)
- Leave, return via email (nurture)
- Google search → ad click (intent)
- Purchase
Average touchpoints before purchase: 4.7 Time from first touch to purchase: 12 days"
Insight: All channels contribute. Stop over-crediting last click.
Common Issues
"API connection failed"
Check:
- WooCommerce REST API enabled?
- API keys copied correctly (no extra spaces)?
- WordPress site accessible publicly (not localhost or staging with IP restrictions)?
- SSL certificate valid (https://)?
"Some orders missing"
Check order status filter in Fivetran:
- By default syncs: completed, processing, on-hold
- Doesn't sync: draft, pending, failed
Adjust filter if you need pending orders.
"Customer data looks incomplete"
WooCommerce guest checkout creates orders without full customer records. This is normal. Cogny can still analyze by email address.
"Product variations not showing up"
Check:
- Products are "Variable" type in WooCommerce
- Variations are published (not draft)
- Fivetran sync includes
product_variationstable
"Data sync stopped"
Check Fivetran connector status:
- Quota limits (free tier: 500K rows/month)
- API rate limits (WooCommerce default: 50 requests/minute)
- WordPress site downtime
Fivetran shows detailed error logs.
Pro Tips
1. Use UTM parameters in marketing campaigns
WooCommerce doesn't track UTM parameters by default.
Add this to your theme's functions.php:
// Save UTM parameters to order meta
add_action('woocommerce_checkout_create_order', function($order, $data) {
if (isset($_COOKIE['utm_source'])) {
$order->update_meta_data('_utm_source', sanitize_text_field($_COOKIE['utm_source']));
}
if (isset($_COOKIE['utm_medium'])) {
$order->update_meta_data('_utm_medium', sanitize_text_field($_COOKIE['utm_medium']));
}
if (isset($_COOKIE['utm_campaign'])) {
$order->update_meta_data('_utm_campaign', sanitize_text_field($_COOKIE['utm_campaign']));
}
}, 10, 2);
Then save UTM to cookies on landing:
// Save UTM to cookies
(function() {
const params = new URLSearchParams(window.location.search);
['utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term'].forEach(param => {
if (params.has(param)) {
document.cookie = param + '=' + params.get(param) + '; path=/; max-age=2592000'; // 30 days
}
});
})();
Now AI can attribute orders to specific campaigns.
2. Track abandoned carts
Install plugin like "WooCommerce Cart Abandonment Recovery"
Captures abandoned cart data. Syncs to BigQuery via Fivetran. AI analyzes why carts are abandoned.
3. Use customer tags
Tag customers in WooCommerce:
- "VIP"
- "Wholesale"
- "Influencer"
These tags sync to BigQuery. AI segments analysis by tag.
4. Enable detailed logging
WooCommerce → Settings → Advanced → Logging
Set log level to "Info" or "Debug"
Helps troubleshoot sync issues.
5. Sync product categories and tags
Make sure Fivetran includes these tables:
product_categoriesproduct_tags
AI uses these for product performance analysis.
6. Track refund reasons
Use plugin to capture refund reasons. Or add custom order notes.
AI identifies patterns:
- "Wrong size" → Size guide problem
- "Quality issue" → Product quality
- "Late delivery" → Shipping optimization
What You Can Do Now
Immediate actions:
-
Identify best customers
- Segment by LTV
- Find common characteristics
- Target lookalike audiences
-
Optimize product catalog
- Best sellers by cohort
- Products that drive repeat purchases
- Dead inventory to clear
-
Fix conversion leaks
- See where carts are abandoned
- Get specific fix recommendations
- Measure impact
-
Improve retention
- Identify churn signals
- Find what drives repeat purchases
- Build automated re-engagement
Alternative: WooCommerce Plugin Method
If you prefer a plugin instead of Fivetran:
Option: WooCommerce Google BigQuery Plugin
Some plugins available on WordPress.org or GitHub:
- "WooCommerce BigQuery Export"
- Custom plugins by hosting providers
Pros:
- No third-party service (Fivetran)
- Potentially free
Cons:
- Less reliable
- Harder to troubleshoot
- May not sync all tables
- Performance impact on your site
Recommendation: Use Fivetran for production. Plugins for testing/POC only.
Next Steps
Immediate actions:
- Export at least 3 months of historical data for baseline analysis
- Segment customers by LTV to find high-value acquisition sources
Advanced implementation:
- CAC Analysis with AI - Calculate true cost per customer across all channels
- Shopify + Cogny Integration - Similar process for Shopify stores
Need help? Contact support
FAQ
Q: Will this slow down my WooCommerce site?
Minimal impact.
Fivetran uses WooCommerce REST API. Queries are rate-limited and throttled.
For extra safety:
- Sync during off-peak hours
- Use caching plugin (WP Rocket, W3 Total Cache)
Q: What about GDPR compliance?
You're the data controller. Data stays in YOUR BigQuery.
For GDPR:
- Update privacy policy to mention analytics
- Provide data deletion on request
- Consider anonymizing customer data in BigQuery
Q: Can I connect multiple WooCommerce sites?
Yes.
Each site becomes a separate dataset. Cogny analyzes together or separately.
Great for:
- Multi-brand stores
- International sites
- Separate B2B and B2C
Q: What's the cost?
Fivetran:
- Free tier: 500K rows/month
- Paid: $60-120/month for most stores
BigQuery:
- Storage: ~$2-10/month
- Queries: Usually free (within Google Cloud free tier)
Total: ~$5-130/month
Q: How often does data sync?
Fivetran free: Daily Fivetran paid: Hourly, or real-time
Most stores don't need real-time. Daily is fine for AI insights.
Q: What if I'm on WooCommerce.com hosted?
Same process works.
WooCommerce.com = WordPress.com with WooCommerce. REST API available on Business plan and higher.
Q: Can I use this with WooCommerce Subscriptions?
Yes.
Subscription data syncs through:
subscriptionstable (subscription details)orderstable (renewal orders)
AI analyzes:
- Subscription churn patterns
- Lifetime value with subscriptions
- Upgrade/downgrade trends
Q: What happens to historical data if I disconnect?
Data already in BigQuery stays there. You keep it forever (unless you delete).
Future syncs stop. Historical analysis still works.
Ready to Unlock WooCommerce Insights?
Most WooCommerce stores don't know:
- Which 20% of customers drive 80% of profit (and where they come from)
- Why 70% of first-time buyers never return
- Which products predict high lifetime value
- How much money is lost to preventable cart abandonment
You can't find this in WooCommerce reports. Too much data. Too many dimensions.
AI finds it automatically.
Not set up yet?
Schedule a demo and we'll show you what's hiding in your WooCommerce data.
About This Guide
Written by the Cogny team—built by the founders who created AI optimization systems for Netflix, Zalando, and Momondo at Campanja, and scaled growth for Kry, Epidemic Sound, and Yubico through GrowthHackers.se.
We've integrated WooCommerce for hundreds of stores. This is the battle-tested process.
Last Updated: December 31, 2024
See Cogny in Action
Schedule a demo to see how AI can transform your marketing analytics and automate your growth optimization.
Schedule Demo