Skip to main content
E-commerce & Tools

How to Connect Your Website to WhatsApp

5 min read

In Morocco, WhatsApp is far more than a messaging app — it’s the primary professional communication channel. With over 98% penetration among smartphone users, your customers expect to be able to reach you via WhatsApp directly from your website.

Here are 4 ways to integrate WhatsApp into your site, from simplest to most advanced.

The fastest and simplest method. You create a link that opens a WhatsApp conversation with your number directly, without the visitor needing to save your contact.

Link format:

https://wa.me/212XXXXXXXXX

With a pre-filled message:

https://wa.me/212XXXXXXXXX?text=Hello%2C+I%27m+interested+in+your+services

Replace 212XXXXXXXXX with your number in international format (212 is Morocco’s code, without the leading 0).

Use it: add this link on your contact page, in the footer, on your call-to-action buttons. Sufficient for a simple brochure site.

Method 2: Floating WhatsApp widget

A fixed green floating button in the corner of your page, visible on every page. This is what you see on most professional Moroccan sites.

How to implement it:

Add this code before the closing </body> tag:

<a
  href="https://wa.me/212XXXXXXXXX?text=Hello%20AjialSkills%2C%20I%20have%20a%20question"
  class="whatsapp-widget"
  target="_blank"
  rel="noopener noreferrer"
  aria-label="Contact us on WhatsApp"
>
  <img src="/icons/whatsapp.svg" alt="WhatsApp" width="56" height="56" />
</a>

<style>
.whatsapp-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.whatsapp-widget:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.55);
}
</style>

Method 3: WhatsApp Business with automatic messages

WhatsApp Business is the free professional version of WhatsApp. It offers extra features very useful for businesses:

  • Welcome message — sent when a customer contacts you for the first time
  • Away message — sent outside business hours
  • Quick replies — respond in one tap to common questions
  • Business profile — address, website, hours visible to customers
  • Labels — organize conversations (new customer, in progress, delivered)
  • Product catalog — showcase your products directly in WhatsApp

To connect it to your site: use the same wa.me/ link format with your WhatsApp Business number.

Method 4: WhatsApp Business API (for larger businesses)

The WhatsApp Business API lets you integrate WhatsApp with your CRM, send automated notifications (order confirmations, delivery tracking), and manage high conversation volumes.

For: e-commerce businesses with high order volume, companies with a structured customer service team.

Cost: variable by message volume. Access is via Meta-certified partners.

Best practices for the Moroccan market

State your availability hours — add your WhatsApp availability on your site and in your WhatsApp Business profile. “Available Mon-Sat 9am-8pm” prevents frustration from customers who don’t get an immediate reply.

Welcome message in the right language — a French or Arabic welcome message (depending on your customer base) immediately sets a professional tone.

Dedicated number — if possible, use a separate number for WhatsApp Business to separate professional contacts.

Reply fast — Moroccan users have high expectations for responsiveness. A reply time under 2 hours is standard.


AjialSkills integrates WhatsApp into every website it builds — floating widget, contact page, form with automatic WhatsApp redirect. Ask us how to optimize your WhatsApp presence for your business.

Let's work together

A project
in mind?

Our team is available Monday to Saturday, 9am to 8pm, to support you in all your digital projects.

Start your journey →