A simple counter next to each popup in the dashboard would be helpful. It would be even cooler if it would also show the impressions, so that the impression/click ratio can be calculated (similar to eg Thrive Leads)
Folks, our former Wishlist portal, where our users shared their requests and suggestions, was transferred to this forum. You’re most welcome to vote, add new ideas, and leave your comments here — we surely will consider them all!
Original Votes: 3
Hi @Info96
We are happy to tell you that you can track the number of popup clicks with the help of Google Analytics code.
Please add this part of the code to your website <head>
:
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-ID "></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-ID ');
</script>
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 </body>
tag:
<script>
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 e.target && e.target.closest(selector)
}
if (isHitClass(event, selector)) {
sendEvent(config);
}
}
document.addEventListener('click', function (event) {
eappsDispatchAnalyticsEvent(event, '[class*="Content__Container-sc"]', {
action: 'click',
category: 'Popup',
label: 'Click on Elfsight Popup'
});
}, true);
</script>
A post was split to a new topic: Google Analytics for Popup doesn’t work
This feture is very important for our website SocialKing.in
Welcome to the Community and thanks for upvoting the idea, @Shubham_Shubh_Gupta
We agree that it would be amazing to have such a counter right in the dashboard, but as a workaround, you can track clicks using the Google Analytics code from the message above.
Feel free to test it out
Where on a website is this tracking code supposed to be input? How do you differentiate between popup widgets? Ex. I want to track performance of a certain popup (call it P1), how will that code being entered track clicks or views of P1 specifically?
Is there any development on additional analytics for this tool? Another user requested an internal dashboard or something similar.
Apologies for missing that!
The 1st part of the code should be added to your website <head>
, and the 2nd part before closing </body>
tag.
If you have several widgets on your website, this code will count the total number of clicks for all widgets. However, we can create a new code, if you’d like to track clicks separately for each widget. For this, please send me a link to the page, where your popups are installed
As for the development, of the dashboard analytics, unfortunately we haven’t got any news yet. If we receive any updates from the dev team, we’ll inform you here right away!