Is it possible to get analytics on the LinkedIn Feed app to get more info about conversions as clics on posts for example.
Hi there and welcome to the Community, @Benjamin_Valette ![]()
Thanks a lot for the idea!
I am glad to say that the info about views is already available in your dashboard:
I also agree that it would be great to have click stats built in the widget and we’ll try to consider this opportunity in the future.
As a temporary solution, our devs can provide you with a Google Analytics code for you.
Would you like to track clicks on each individual post element (such as the Read More button, Company Logo, Text, or Image), or would you prefer to track the total number of clicks without specifying which element was clicked?
Hi,
Thanks for your answer.
Your temporary solution looks great. I would prefer to track each individual post element. And if possible post per post that would be better to analyse which posts performs the most.
Got it, thanks!
I’ve forwarded your request to the devs and will share a solution once it’s ready ![]()
Our devs have prepared a Google Analytics code for you. Please add this part of the code to your website :
<script async src="https://www.googletagmanager.com/gtag/js?id=G-ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-ID');
</script>
In the code above, you need to replace G-ID with your actual website ID for Google Analytics. This article will help you find your ID - Find your Google tag ID.
And then just add the rest of the script to the Custom JS field on the Settings tab of your widget’s settings:
function eappsDispatchAnalyticsEvent(
event,
selector,
config,
text = '',
postLink = ''
) {
function sendEvent(config) {
const finalLabel = postLink
? `${config.label} | ${postLink}`
: config.label;
if (typeof ga !== 'undefined') {
ga('send', 'event', {
eventAction: config.action,
eventCategory: config.category,
eventLabel: finalLabel,
});
}
if (typeof gtag !== 'undefined') {
gtag('event', config.action, {
event_category: config.category,
event_label: finalLabel,
});
}
}
const isHitClass = ({ target }, selector, text) => {
const el = target?.closest(selector);
if (!el) return false;
if (!text) return true;
return el.textContent?.includes(text);
};
if (isHitClass(event, selector, text)) {
sendEvent(config);
}
}
document.addEventListener(
'click',
function (event) {
let link = '';
const card = event.target?.closest('[class*="CardContainer-sc"]');
if (card) {
const linkEl = card.querySelector(
'[class*="CardActionsBlock__CardLayoutBlock-sc"] a'
);
link = linkEl?.getAttribute('href') || '';
}
eappsDispatchAnalyticsEvent(
event,
'.es-text-shortener',
{
action: 'click',
category: 'Elfsight LinkedIn Feed Widget',
label: 'Post text',
},
'',
link
);
eappsDispatchAnalyticsEvent(
event,
'[class*="MediaImage__Container-sc"] img',
{
action: 'click',
category: 'Elfsight LinkedIn Feed Widget',
label: 'Post image',
},
'',
link
);
eappsDispatchAnalyticsEvent(
event,
'.es-text-shortener-control',
{
action: 'click',
category: 'Elfsight LinkedIn Feed Widget',
label: 'Read more button',
},
'',
link
);
eappsDispatchAnalyticsEvent(
event,
'[class*="SourceLink__StyledLink-sc"]',
{
action: 'click',
category: 'Elfsight LinkedIn Feed Widget',
label: 'LinkedIn logo',
},
'',
link
);
const userElem = event.target.closest(
'[class*="CardUserBlock__UserContainer-sc"]'
);
if (userElem) {
const userNameElem = userElem.querySelector('[class*="User__Name-sc"]');
const userName = userNameElem?.textContent?.trim() || 'User';
eappsDispatchAnalyticsEvent(
event,
'a[class*="User"]',
{
action: 'click',
category: 'Elfsight LinkedIn Feed Widget',
label: `${userName} link`,
},
'',
link
);
}
},
true
);
This article explains where you can find the info about clicks - Google Analytics 4 (GA4): Where to find my events - Elfsight Help Center
Please let me know if it helps and if you have any other questions ![]()

