Track WooCommerce Cart Recovery Emails with UTM Tags with AI
See the visits and sales your abandoned cart emails bring back, tagged in Google Analytics.
Prerequisites
A WooCommerce store connected to WPVibe running Cart Abandonment Recovery for WooCommerce 2.2.0 or newer (tested on the free 2.2.2) on WordPress 6.9 or newer, with an administrator account.
My WooCommerce store uses Cart Abandonment Recovery. Add UTM tags to the links in my cart recovery emails so I can see their sales in analytics. [Optional: the source, medium and campaign names I already use.]
1. First run discover_abilities with category wcar. If it finds none, run rest_api GET /wp/v2/plugins with search cart abandonment. If Cart Abandonment Recovery for WooCommerce is not installed or not active, tell me this recipe is for that plugin and stop. If it is active but older than 2.2.0, tell me to update it (these steps need 2.2.0 or newer) and stop. If it is 2.2.0 or newer and discover_abilities still finds none, run run_wp_cli core version and tell me my WordPress version: the AI tools need WordPress 6.9 or newer.
2. Run wcar/get-setting with key wcf_ca_global_param (UTM parameters). If it already has tags, show them and ask whether to replace or keep them.
3. Suggest the tags, one per line as key=value, for example utm_source=cart-recovery, utm_medium=email, utm_campaign=abandoned-cart; use my names if I gave them. Lowercase, no spaces, exactly one equals sign per line, nothing else on the line: the plugin splits each line at the equals sign. Wait for my yes.
4. Run wcar/update-setting with key wcf_ca_global_param and the lines joined by a line break. Read it back with wcar/get-setting.
5. Check a real link: Read carts with rest_api_write POST /wcar/api/admin/follow-up/ with body {"status":"abandoned_orders","per_page":100} (status can also be recovered_orders, lost_orders or all; add "page":2 and so on while more come back; date_from and date_to take YYYY-MM-DD). It only reads. Keep only rows whose orderStatus matches the status asked for. Read one cart with rest_api_write POST /wcar/api/admin/detailed-report/ with body {"id":ID}: details (email, cart_total, coupon_code, unsubscribed, time), user_details (first and last name), order_details.items, scheduled_emails, and checkout_link. The checkout link restores that shopper's cart for whoever opens it, and can fill in their name, email and phone at checkout: never post it anywhere but a message to that shopper. Take the newest cart with status all and per_page 1, read its detailed report, and confirm checkout_link ends with my tags (the ampersands between the tags may show as an HTML code). Show me only the part after the token, not the whole link. If there are no carts yet, tell me the tags will appear on the next one.
6. Tell me where to see the results: in Google Analytics, Reports > Acquisition > Traffic acquisition with Session source / medium, or the campaign name. To remove the tags later, ask for wcf_ca_global_param to be set to an empty value.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Track WooCommerce Cart Recovery Emails with UTM Tags with AI” recipe from the WPVibe cookbook on my connected site.
When a shopper comes back from a cart recovery email and buys, your analytics usually files the sale under direct traffic or email in general. You cannot tell how much the reminders earn, or compare them with your newsletter.
The AI adds UTM tags to the checkout link in every Cart Abandonment Recovery email, so the visits and sales they bring show up under their own source and campaign in Google Analytics and similar tools. It suggests tags that match what you already use, shows them before saving, and checks a real recovery link afterwards.
The tags apply to every recovery email sent from now on, including ones already scheduled. Undo is one setting.
Outcome
Every recovery email's checkout link carries your UTM tags, confirmed in a real recovery link.