← Voltar na listagem

26 de setembro de 20244 min de leitura

How to Organize Your LinkedIn Feed by Likes/Reactions

Efficiently sort your LinkedIn feed to prioritize posts with the most engagement!

When browsing through LinkedIn, the feed displays posts in chronological order, which might not highlight the most engaging content. This guide will show you how to sort your LinkedIn feed by likes or reactions using JavaScript, allowing you to focus on the most impactful content.

The Problem with Chronological Feeds on LinkedIn

LinkedIn's default feed can make it difficult to:

  • Identify Popular Content: High-engagement posts may get buried under newer, less engaging content.
  • Analyze Engagement Metrics: Understanding what resonates with your professional network becomes challenging.
  • Enhance Content Strategy: Without visibility into top-performing posts, optimizing your content is harder.

The Solution: Sorting LinkedIn Posts by Reactions

By sorting posts based on the number of likes or reactions, you can:

  • Spot Trends: Quickly identify which topics are gaining traction in your industry.
  • Improve Content Creation: Tailor your posts based on what your audience engages with the most.
  • Boost Engagement: Interact with high-performing content to increase your visibility and networking opportunities.

How to Sort Your LinkedIn Feed by Reactions

Note: This method involves executing JavaScript in your browser's console and is specific to LinkedIn. Ensure you have all posts loaded by scrolling through your activity feed before running the script.

Step 1: Load All Posts

LinkedIn uses infinite scrolling to load content dynamically. To ensure the script works correctly:

  • Manual Scrolling: Scroll through your activity feed until all desired posts are loaded.
  • Keyboard Shortcut: Hold down the Page Down key to scroll faster until no new posts appear.

Step 2: Open the Browser Console

  • Press F12 or Ctrl+Shift+I (Windows) / Cmd+Option+I (Mac) to open the developer tools.
  • Navigate to the Console tab.

Step 3: Execute the Sorting Script

Copy and paste the following JavaScript code into the console and press Enter:

// Step 1: Select the <ul> element containing the list items
const ul = document.querySelector('ul.display-flex.flex-wrap.list-style-none.justify-center');

// Step 2: Create an array of <li> elements
const liItems = Array.from(ul.querySelectorAll('li.profile-creator-shared-feed-update__container'));

// Step 3: Map each <li> to an object containing the element and the number of reactions
const liWithReactions = liItems.map(li => {
    // Find the <span> that contains the number of reactions
    const reactionSpan = li.querySelector('span.social-details-social-counts__reactions-count');
    // Get the text of the number of reactions and trim whitespace
    const reactionsText = reactionSpan ? reactionSpan.textContent.trim() : '0';
    // Convert the text to an integer
    const reactionsNumber = parseInt(reactionsText.replace(/\D/g, ''), 10);
    return {
        liElement: li,
        reactions: reactionsNumber
    };
});

// Step 4: Sort the array based on the number of reactions (descending order)
liWithReactions.sort((a, b) => b.reactions - a.reactions);

// Step 5: Update the DOM with the sorted items
// Remove all current <li> elements
ul.innerHTML = '';

// Append the sorted <li> elements back to the <ul>
liWithReactions.forEach(item => {
    ul.appendChild(item.liElement);
});

Benefits of Sorting Your LinkedIn Feed

By organizing your LinkedIn feed based on reactions, you gain several advantages:

  • Content Creation Insights: Understand which topics and formats engage your professional audience the most.
  • Data-Driven Decisions: Use engagement metrics to refine your LinkedIn content strategy.
  • Audience Preferences: See what your network is enjoying and discussing within your industry.
  • Efficient Networking: Focus your interactions on high-impact posts to expand your professional connections.

Conclusion

Sorting your LinkedIn feed by likes or reactions allows you to prioritize content that matters most to you and your professional network. By leveraging the provided JavaScript code, you can enhance your content analysis and engagement efforts on LinkedIn.

We'd love to hear from you!

Did you find this method helpful? Do you have a better approach to sorting your LinkedIn feed? Share your thoughts and suggestions in the comments below!