Connecting whatsapp to google ads + dashboard

I think it would be awesome to have a premium option to connect whatsapp to google ads with a code who creates an event on GA4
then I’ll use the event and mark it as conversion to import it into google ADS.

A dashboard with data on each whatsapp widget who shows me how many people clicked on the widghet in a specific website.

Hi @user8379 and welcome to the Community :wave:

Thanks for sharing your idea!

Please let me check with our dev team if anything can be done. I’ll get back to you once any news come up :slightly_smiling_face:

Thank you for waiting!

Unfortunately, there is no option to track the number of clicks right in the dashboard.

However, you can do this using a Google Analytics code. Please add this part of the code to your website <head>:

<script async src="**UA-ID** "></script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '**UA-ID** ');

In the code above, you need to replace UA-ID with your actual website ID for Google Analytics. If you are using Google Analytics 4, you need to use G-ID instead of UA-ID (see screenshot). This article will help you find your ID - Find your Google tag ID.

And then just add the rest of the script right before closing tag:

function eappsDispatchAnalyticsEvent(event, selector, config) {
    function sendEvent(config) {
        if (typeof ga !== "undefined") {
            ga('send', 'event', {
                eventAction: config.action,
                eventCategory: config.category,
                eventLabel: config.label
        if (typeof gtag !== "undefined") {
            gtag('event', config.action, {
                'event_category':  config.category,
                'event_label':  config.label
    function isHitClass(e, selector) {
        return &&
    if (isHitClass(event, selector)) {
document.addEventListener('click', function (event) {
    eappsDispatchAnalyticsEvent(event, '[class*="Bubble__BubbleComponent"]', {
        action: 'click',
        category: 'Open or Close WhatsApp Chat Widget',
        label: 'Open or Close WhatsApp Chat Widget'
    eappsDispatchAnalyticsEvent(event, "button[title='WhatsApp']", {
        action: 'click',
        category: 'Click WhatsApp Chat',
        label: 'Click WhatsApp Chat'
}, true);

Please let me know if it helps :slightly_smiling_face:

As for the connecting WhatsApp chat to Google Ads, our devs will be happy to help. To do this, we’ll need temporary access to your GTM. You can share it to

Please let me know once it’s done and we’ll start working on your request.


first of all - the elfsight service is amazing!
thanks for everything.

about the code - this code creates an event go GA?

thanks in advance

‫בתאריך יום ה׳, 28 בדצמ׳ 2023 ב-13:21 מאת ‪Max via Elfsight Community‬‏ <‪‬‏>:‬

1 Like

Wow, a huge thank you for your kind feedback :heart:

Yes, this code creates an event in GA. Just in case, here is an article explaining where to find them - Google Analytics 4 (GA4): Where to find my events - Elfsight Help Center