=== Joinchat - Enhanced "click to chat" ===
Contributors: creapuntome, pacotole, davidlillo, monillo
Donate link: https://join.chat/donate/
Tags: WhatsApp, WhatsApp Button, Click to Chat, Floating Button, Chat
Requires at least: 4.9.6
Tested up to: 7.0
Requires PHP: 7.0
Stable tag: 6.2.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

The most installed WordPress plugin for WhatsApp: a customizable floating button that turns your visitors into chats, leads and sales.

== Description ==

**Turn conversations into conversions**

Joinchat is the most installed plugin for WhatsApp: a customizable floating button that turns your visitors into chats, leads and sales.

Built for conversion from the very first click: eye-catching CTAs, dynamic start messages, native WooCommerce integration and built-in analytics to measure every conversation.

🌍 **Joinchat, the global leader in WhatsApp click to chat**

🗺️ Present in more than 176 countries

🏆 **#1 chat solution in:** 

🇦🇷 Argentina 🇨🇴 Colombia 🇧🇷 Brazil 🇪🇸 Spain 🇳🇱 Netherlands 🇲🇽 Mexico 🇨🇱 Chile 🇵🇪 Peru 🇵🇹 Portugal

*Source: BuiltWith®*

## What you get with Joinchat

A complete WhatsApp conversion toolkit for WordPress, designed to capture more leads and close more sales.

* **Floating WhatsApp button** that opens the WhatsApp app on mobile, and on desktop launches WhatsApp Desktop or WhatsApp Web and **shows a scannable QR code**.
* **Eye-catching CTAs** to greet visitors, present offers and start the chat with the right message.
* **Dynamic start messages** so every conversation arrives with full context (the page, the product, the price, the discount…).
* **WooCommerce integration**, with a contact button next to "Add to cart" and shop-specific CTAs.
* **Analytics built in** — 🆕 — Clicks counter in your WordPress dashboard. Events for Google Analytics 4, Google Tag Manager and Facebook Pixel, plus Google Ads conversions.
* **Lightweight and fast** — JavaScript with no dependencies and lazy-loaded styles. No render-blocking.
* **Customizable site-wide** or at the page, product, category, etc. level.

## 🛡️ Say goodbye to the fear of WhatsApp bans

Many companies lose their WhatsApp Business number for contacting customers first without consent. Joinchat flips the model: **the visitor writes first**, so every conversation starts aligned with WhatsApp's official policies.

The result: your business number protected and your customers reaching out when they need to, not the other way around.

With Joinchat, you can unlock the full potential of WhatsApp's "click to chat" feature.

## Take Joinchat further with Premium and AI

Joinchat Free is just the start. **Premium and AI** unlock its full conversion potential.

* 💬 **Add more support channels** — extend beyond WhatsApp with Telegram, Facebook Messenger, phone calls and more, all from the same widget.
* 🕒 **Multi-agent with custom schedules** — assign chats to the right person at the right time. Each agent works their own hours and only takes chats when available, and you can **set an alternative CTA when no agents are online**.
* 🔁 **Add a Chat Funnel** — guided conversational flows that qualify and capture leads automatically with higher conversion than a form, 24/7, even when no one is at the desk.
* ✨ **Add an AI agent** — trained on your FAQs and website content. Answers visitors instantly, anytime, with the tone and knowledge you define.

**[👉 Get Joinchat Premium](https://join.chat/en/premium/?utm_source=wporg&utm_medium=web)** | **[👉 Get Joinchat AI](https://join.chat/en/ai/?utm_source=wporg&utm_medium=web)**

### 📝 Settings at page or archive level
You can **change main settings on every Post, Page, Product or CPT and for Tag or Category archive pages**. Edit your WhatsApp number, CTA, Start Message and Visibility options.

### 🔴 Show a notification
Use a balloon on the button to get the visitor's attention. In this way, you ensure that you do not miss any important message you want to give them, surprise them in a less intrusive way.

### 📯 Create call-to-action messages
CTAs with **Rich Chat**: multiple chat bubbles with links, buttons, images or random text. Encourage users to contact you with a welcome message, offering help or promotions and offers. [Read more](https://join.chat/es/joinchat-mucho-mas-que-un-click-to-chat/?utm_source=wporg&utm_medium=web)

### 💬 Customize conversation start messages
Defines a pre-loaded initial message for when the user contacts via WhatsApp. Add context with our "Dynamic Variables" and you will know what page the visitor is coming from or what product they are looking at when they start the chat.

### ✅ Opt-in text
Opt-in is a users' consent to receive messages from a business.

Write a text with the conditions under which the visitor contacts you (or other info that you consider important). 

You can make it mandatory and disable contact until the user accepts it.

### 🛒 Integration with WooCommerce
Set CTAs and Start Messages for shop page, product pages and for products on sale.

Add a **WhatsApp Contact Button** directly on your product page next to the "Add to cart" button or choose the best position, even on products without a price.

### 🧩 WhatsApp Contact Button Block
Add beautiful and customizable WhatsApp contact buttons in the **Block Editor**. You can define phone and initial message of the button or use the post/general Joinchat settings (ideal for Reusable Blocks).

Enable QR Code on desktop to allow your visitors to scan it and start messaging from their phone.

### 🃏 Dynamic Variables
Use variables in your CTAs and Start Messages that change dynamically for each page:

- **{SITE}** ➡ Website title
- **{TITLE}** ➡ Current page title
- **{HOME}** ➡ Website home url
- **{URL}** ➡ Current page url
- **{HREF}** ➡ Current page url (full with query params)
- **{PRODUCT}** ➡ Product name (Woo)
- **{SKU}** ➡ Product SKU (Woo)
- **{REGULAR}** ➡ Product regular price (Woo)
- **{PRICE}** ➡ Product current price (Woo)
- **{DISCOUNT}** ➡ Product percent discount when is on sale (Woo)

### 📈 Analytics Integration
Automatically send events to **Google Analytics, Google Tag Manager and Facebook Pixel** when the user opens WhatsApp.

- — 🆕 — **Clicks counter** in your WordPress dashboard
- **Google Analytics 4** send the recommended `"generate_lead"` event
- **Google Tag Manager** send `"JoinChat"` event
- **Facebook Pixel**  send `"JoinChat"` event
- **Google Ads** conversion, just add your Conversion ID and Conversion Label

You can also **create your own custom events or add event parameters**. [View FAQs](https://wordpress.org/plugins/creame-whatsapp-me/faq/) / [Read more](https://join.chat/en/joinchat-measures-whatsapp-events-in-google-analytics/?utm_source=wporg&utm_medium=web)

### 🍾 Chat Triggers
Any element in your page can be a chat trigger, eg: it can launch WhatsApp from a link or show the Joinchat CTA when the user scrolls to the footer.

**On page load (by url):**

* url query param `joinchat` to show chat window. Can set delay in seconds, default is 0 *(e.g. example.com/page/?joinchat=5)*
* url query hash `#joinchat` to show chat window *(e.g. example.com/page/#joinchat)*

**On click:**

* class `"joinchat_app"` direct launch WhatsApp
* class `"joinchat_open"` opens Joinchat CTA
* link href `"#whatsapp"` direct launch WhatsApp
* link href `"#joinchat"` opens Joinchat CTA

Set **custom phone and initial message** for direct WhatsApp triggers:

* `data-phone="99999999"`
* `data-message="Only for this trigger message"`.

**On scroll (when element appears on screen):**

* class `"joinchat_show"` opens Joinchat CTA (first time)
* class `"joinchat_force_show"` opens Joinchat CTA (always)

### 💱 Multi-Language & RTL Support
To be able to support all your users, wherever they are. Our plugin is **compatible with WPML, Polylang and — 🆕 — TranslatePress** and also **RTL languages** are supported.

### 🌈 Theme Colors & 🌚 Dark Mode
You choose a color and we customize the entire visual theme of the widget. With Dark Mode display the chat window with dark colors and white text. From settings you can activate it or leave it automatic and detects devices' configuration.

### ⚡ Fast & Light
Only load what need when needed. Joinchat is lightweight and follow best coding practices. Use vanilla **JavaScript without dependencies**, deferred scripts and lazy load of styles to **prevent render-blocking**.

See [Tests Report](https://wphive.com/plugins/creame-whatsapp-me/) and [Speed Score](https://makewpfast.com/plugins/creame-whatsapp-me/).

### 🔕 No distractions
Joinchat integrates with all major Visual Editors and Page Builders and will not appear when editing a page.

Supported editors: **Beaver Builder**, **Brizy Page Builder**, **Elementor**, **Oxygen Builder**, **Page Builder by SiteOrigin**, **Thrive Architect**, **Visual Composer** and **WP Page Builder**.

### 🍪 Cookies & GDPR
**Joinchat can be used without any cookies**. But to automatically display the CTA, two cookies are necessary. They are first-party cookies and don't collect personal data.

Joinchat integrates with *Wordpress's Privacy Policy Guide* and suggests the necessary text.

### 👨‍💻 Developer friendly
Fully extensible, with lots of filters and actions to extend its functionality or change behavior.

[Documentation](https://join.chat/en/docs/?utm_source=wporg&utm_medium=web)

### ⌁ If you like Joinchat 😍
1. Please leave us a [★★★★★](https://wordpress.org/support/plugin/creame-whatsapp-me/reviews/#new-post) rating. We'll thank you.
2. Help us with the [translation in your language](https://translate.wordpress.org/projects/wp-plugins/creame-whatsapp-me)
3. Visit our blog and find tips and tricks at [join.chat](https://join.chat/en/blog/?utm_source=wporg&utm_medium=web).
4. Follow [@joinchatnow](https://x.com/joinchatnow) on X. Join chat now!


== Installation ==

1. Upload the entire `creame-whatsapp-me` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.


== Frequently Asked Questions ==

= I can't see the button or it's over / under another thing =

You can change the position of the button so that nothing covers it by adding this CSS in *Joinchat Settings > Advanced > Custom CSS*:

`.joinchat { z-index:999999; }`

Higher values of z-index are above, the default value is 9000.

If you need to move up:

`/* always */
.joinchat { --bottom: 60px; }

/* mobile only */
@media (max-width: 480px), (orientation: landscape) and (max-height: 480px) {
  .joinchat { --bottom: 60px; }
}`

= Change button size =

You can change the button size by adding this CSS in *Joinchat Settings > Advanced > Custom CSS*:

`/* always */
.joinchat { --s: 50px; }

/* mobile only */
@media (max-width: 480px), (orientation: landscape) and (max-height: 480px) {
  .joinchat { --s: 40px; }
}`

For WooCommerce Product Button you can change size with:

`.joinchat__woo-btn { --s: 50px; }`


= Shortcodes / Triggers =

Joinchat does not provide any shortcodes, but you can easily link to WhatsApp in two ways:

1. Add an anchor link to `#whatsapp` (open WhatsApp directly) or `#joinchat` (show chat window).<br>e.g.: add in your menu a custom link with the URL `#whatsapp`
2. Add a css class to any element, `joinchat_app` (open WhatsApp directly) or `joinchat_open` (show chat window).<br>e.g.: `<img src="contact.jpg" class="joinchat_open" alt="Contact">`

This works with your phone settings and message with dynamic variables, **even on pages without Joinchat visible**.

For custom direct WhatsApp links you can add `data-phone` and `data-message` attributes.<br>e.g.: `<a href="#whatsapp" data-phone="99999999" data-message="I want to chat">Chat now!</a>`

= Disable enhanced telephone input =

Joinchat uses International Telephone Input library to facilitate and validate the introduction of the phone number in the format of each country. If you have problems with your phone number or you want to write it directly without any changes you can disable it with this filter *(remember follow [WhatsApp guidelines](https://faq.whatsapp.com/general/contacts/how-to-add-an-international-phone-number))*:

`add_filter( 'joinchat_enhanced_phone', '__return_false' );`

= Allow other roles to change settings =

By default Joinchat settings can only be edited by users with `manage_options` capability (administrator).
You can change the required capability with the filter `"joinchat_capability"`.

`// e.g. allow shop managers:
add_filter( 'joinchat_capability', function(){ return 'manage_woocommerce'; } );

// e.g. allow editors:
add_filter( 'joinchat_capability', function(){ return 'edit_pages'; } );`

Since v4.4 Joinchat menu is placed as direct menu in your wp-admin but you can change it with the filter `"joinchat_submenu"`:

`// Show as submenu under Settings (also require "manage_options" capability)
add_filter( 'joinchat_submenu', '__return_true' );`

= Disable Gutenberg sidebar =

The block editor evolves quickly and errors can occur that we have not anticipated.

If you have any errors with Gutenberg and Joinchat or simply prefer the old Joinchat metabox you can use this filter:

`add_filter( 'joinchat_gutenberg_sidebar', '__return_false' );`

= WPML/Polylang translations =

Joinchat settings are saved in your site's main language. For other languages translation go to *WPML/Polylang Settings > String translations*, filter strings group by "Joinchat" and update the strings for each language.

= Google Tag with multiple destinations =

Joinchat since 5.1 can detect multiple destinations in Google Tag and send events to all of them.

= Google Analytics 4 integration =

Joinchat sends a custom event when user launch WhatsApp.

If Google Analytics 4 (gtag.js) is detected, use the recommended `'generate_lead'` event:

`gtag('event', 'generate_lead', {
    event_category: 'JoinChat',
    event_action: 'whatsapp: 99999999999',
    event_label: destination_url,
    chat_channel: 'whatsapp',
    chat_id: '99999999999',
    is_mobile: 'yes' | 'no',
});`

If your site don't have standard names for data layer ('dataLayer') you can set your custom names with this PHP filter. **Also can set a different event name for GA4**:

`// Rename GA4 event / Rename dataLayer name
add_filter( 'joinchat_get_settings', function( $settings ){
    $settings['ga_event'] = 'myGA4Event';
    $settings['data_layer'] = 'dataLayerCustom';
    return $settings;
} );

// Disable GA4 event
add_filter( 'joinchat_get_settings', function( $settings ){
    $settings['ga_event'] = false;
    return $settings;
} );`

Joinchat is compatible with plugins **MonsterInsights – Google Analytics Dashboard for WordPress**, **Google Tag Manager for WordPress** and **PixelYourSite** custom names.

= Google Tag Manager integration =

Joinchat sends a `'JoinChat'` event if GTM is detected when user launch WhatsApp:

`dataLayer.push({
    event: 'JoinChat',
    event_action: 'whatsapp: 99999999999',
    event_label: destination_url,
    chat_channel: 'whatsapp',
    chat_id: '99999999999',
    is_mobile: 'yes' | 'no',
    page_location: current_url,
    page_title: page_title,
});`

= Facebook Pixel integration =

Joinchat sends a `'JoinChat'` custom event if Facebook Pixel is detected when user launch WhatsApp:

`fbq('trackCustom', 'JoinChat', {
    event_action: 'whatsapp: 99999999999',
    event_label: destination_url,
    chat_channel: 'whatsapp',
    chat_id: '99999999999',
    is_mobile: 'yes' | 'no',
    page_location: current_url,
    page_title: page_title,
});`

= Custom Events / add Event Parameters =

Joinchat triggers custom events before launch WhatsApp `'joinchat:open'` and before send analytics events `'joinchat:event'`.

You can use them to extend them to your needs, add extra functions, cancel events or add extra parameters.

`// e.g.: Send webhook to Zapier
jQuery(document).on('joinchat:event', function (event, params) {
  jQuery.post('https://hooks.zapier.com/hooks/catch/123456/xxxxxx/', params );
});

// e.g.: Add user_is_logged param for GA4/GTM event
jQuery(document).on('joinchat:event', function (event, params) {
  params.user_is_logged = document.body.classList.contains('logged-in') ? 'yes' : 'no';
});`

= What about GDPR? =

**Joinchat can be used without any cookies**.

Depending on your Joinchat settings, two cookies may be needed. They are first-party cookies and don't collect personal data.

* `joinchat_views` is a visits counter to control when to show chat window.
* `joinchat_hashes` saves when a user has interacted with a CTA to prevent automatically show that CTA again.

You can view in your *Settings > Privacy > Policy Guide* the suggested text by Joinchat.


== Screenshots ==

1. Real example
2. Real example
3. Real example
4. Real example
5. Real example
6. Real example
7. Product Button example
8. General settings
9. Visibility settings
10. WooCommerce settings
11. Advanced settings
12. Page settings


== Changelog ==

= 6.2.3 =
* **NEW** Compatible with **PixelYourSite** custom DataLayer name

= 6.2.2 =
* Enhanced clicks counter to prevent duplicates (in a 60s window) and bot hits
* Add icon to dashboard widget

= 6.2.1 =
* Fix migrate setting from Header to Show Branding

= 6.2.0 =
* New Clicks Counter widget on dashboard
* New Add compatibility with TranslatePress for multi-language support
* Change branding label out of chat window header
* Fix detect videos with webm extension for animated images
* Fix chat bubble HR separator styles
* Fix Plugin Check (PCP) fixes

= 6.1.3 =
* Fix recover Gutenberg compatibility with WordPress < 6.6

= 6.1.2 =
* Fix editor error on WordPress 6.9 on edit page with "Joinchat Button" block
* Updated "Joinchat Button" block with more flexible controls (orientation vertical/horizontal, align, gap and button settings)
* New event parameter "trigger" on JS events "joinchat:show" and "joinchat:open"
* New JS event "joinchat:optin" on change opt-in value

= 6.1.1 =
* Fix revert defer styles with media="print" because some optimizers remove them.
* With WP 6.9 and classic theme ensure enqueue styles on header.

= 6.1.0 =
* New Added WordPress Abilities for set main settings and generate WhatsApp "click to chat" links
* Updated Joinchat Block with API V3
* Updated admin styles for WordPress 7.0
* Add smooth transitions as the chat window grows and other modern CSS optimizations
* Add lazy load for animated images (as webm video)
* Fix WordPress 6.9 don't load styles with classic themes in some cases
* Bump tested up to Wordpress 7.0

= 6.0.10 =
* Tweak CTA random text allow html tags (bold, italic, img...)

= 6.0.9 =
* New add WordPress 6.9 script enqueue option fetchpriority low
* Bump tested up to Wordpress 6.9
* Tweak replace png images to webp
* Tweak Updated IntTelInput library to 25.13.3

= 6.0.8 =
* New allow to disable GA4 event with filter 'joinchat_get_settings' and set 'ga_event' as false
* Fix mask WhatsApp phone number for Facebook Pixel events
* Fix add aria-label to Joinchat floating button


= 6.0.7 =
* Fix dark styles for loading and note messages
* Fix admin JS conflict when other plugin use IntTelInput library
* Fix Joinchat settings don't work with HivePress

= 6.0.6 =
* Aff a filter for Litespeed Cache plugin to ensure Joinchat JS/CSS assets version. Prevent Joinchat break layout if visitor has Joinchat v5 cached assets (thanks to @tendenzeshabbychic and @qtwrk).

= 6.0.5 =
* Fix CSS transparent background color if only floating button without chatbox.

= 6.0.4 =
* Fix some js conflicts in wp-admin if other plugins adds IntTelInput.

= 6.0.3 =
* Fix js error with variable product SKU.

= 6.0.2 =
* Bump min PHP version to 7.0.
* Add fallback to missing functions in older WordPress versions.
* Fix fatal error on old add-ons with missing class JoinchatUtil.
* Fix Woo product button styles.

= 6.0.1 =
* Fix hidden attribute can make button invible with some CSS resets (like Bootstrap).

= 6.0.0 =
* New **Rich Chat**: multiple chat bubbles with links, buttons, images and random texts.
* **Improved performance**: vanilla JavaScript without any dependency and lazy loading of styles and scripts.
* **New button icons** and allows to keep the alternative image fixed.
* Integration with new **WooCommerce brands**.
* Other optimizations: refactor and improved styles, updated phone input (37 translations included), added **{HOME}** variable, etc.

See [changelog.txt](https://plugins.svn.wordpress.org/creame-whatsapp-me/trunk/changelog.txt) for older changelog


== Upgrade Notice ==

**Joinchat 6** is a mayor version that includes refactored layout, styles and JavaScript. Please check your site after updating.
**Joinchat Premium users:** You need to upgrade to Joinchat Premium 6 for full compatibility.
