Skip to Content
FeaturesMarketing

Marketing

Overview

The Marketing feature helps Siyahfy vendors reach their customers through multiple channels. It includes Google Analytics integration for traffic and conversion tracking, WhatsApp marketing via the Wonestop API for direct customer messaging, and abandoned cart recovery workflows. Vendors can view marketing performance data broken down by channel and time period, and send targeted messages to recover lost sales.

How It Works

Marketing Analytics

The analytics dashboard pulls data from Google Analytics (GA4) and internal order data to show:

MetricSource
SessionsGoogle Analytics
Conversion RateGoogle Analytics
RevenueGoogle Analytics + Internal orders
Average Purchase RevenueGoogle Analytics
Channel AttributionGoogle Analytics (UTM tracking)

Data is fetched daily from GA4 and stored in hourly_marketing_reports for fast dashboard rendering.

WhatsApp Marketing

Siyahfy integrates with Wonestop (a WhatsApp Business API provider) to enable:

  1. Settings configuration — Vendor connects their Wonestop API token and phone number.
  2. Template management — Create and manage WhatsApp message templates (must comply with Meta’s template policies).
  3. Campaign sending — Send marketing messages to customer segments.
  4. Test messages — Send a test message before launching a campaign.
  5. Campaign analytics — Track delivery, read, and response rates.

Abandoned Cart Recovery

When customers leave items in their cart without completing checkout:

  1. The system records the abandoned checkout with cart details and customer info.
  2. After a configurable delay (e.g., 1 hour, 24 hours), a recovery message is sent.
  3. Messages can be sent via email or WhatsApp.
  4. The message includes a link to restore the customer’s cart.
  5. If the customer completes the order, the abandoned checkout is marked as recovered.

Key API Endpoints

Marketing Analytics

GET/api/marketing-dataAuth Required

Get marketing performance data (sessions, revenue, conversion) by date range

GET/api/google-marketing-summaryAuth Required

Get summarized Google Analytics marketing data by channel

WhatsApp Marketing

GET/api/whatsapp-marketing/settingsAuth Required

Get WhatsApp marketing configuration (API token, phone number)

POST/api/whatsapp-marketing/settingsAuth Required

Save or update WhatsApp marketing settings

GET/api/whatsapp-marketing/templateAuth Required

Get WhatsApp message templates

POST/api/whatsapp-marketing/templateAuth Required

Create or update a WhatsApp message template

GET/api/whatsapp-marketing/campaignsAuth Required

Get WhatsApp campaign history and analytics

POST/api/whatsapp-marketing/send-testAuth Required

Send a test WhatsApp message to verify template and settings

GET/api/whatsapp-marketing/analyticsAuth Required

Get WhatsApp campaign delivery and engagement analytics

Abandoned Cart Recovery

GET/api/allabandoncheckouts/:storeAuth Required

List all abandoned checkouts for a store

POST/api/abandoned-checkout-settingsAuth Required

Configure abandoned checkout recovery settings (timing, channel, template)

POST/api/send-abandon-messagesAuth Required

Manually send recovery messages for selected abandoned checkouts

Database Tables

TablePurpose
hourly_marketing_reportsCached marketing data from Google Analytics (date, hour, sessions, revenue, channel)
whatsapp_marketing_settingsWhatsApp API configuration per store (API token, phone number)
whatsapp_templatesWhatsApp message templates
whatsapp_campaignsCampaign records with delivery and engagement stats
abandon_checkoutsAbandoned checkout sessions with cart data, customer info, and recovery status
  • Analytics — Marketing data feeds into the analytics dashboard
  • Orders — Abandoned checkouts are recovered orders
  • Customers — Marketing campaigns target customer segments
  • Discounts — Recovery messages often include discount codes