Documentation        Log in

Linkedin Audiences

How to segment your audiences in LinkedIn?

LinkedIn doesn’t support creating audiences from events, so we created a solution to fire virtual pageviews that represent these events. Learn more on this blog post .

Simply fill in below your LinkedIn Ad Account’s PID ( where do I get this from? ) and the psuedo URL of the event you want to track. This page does not have to be an actual URL on your site, but must use the site’s domain.

#li-form { font-family: Quicksand; align-items: center; display: flex; flex-flow: row wrap; } #li-form input { border: 1px #3c3c3c solid; border-radius: 3px; padding: 5px 5px; margin: 5px 5px; } #url { width: 320px; } #pid { width: 120px; } #li-form button { fill: #000000; color: #000000; background-color: #f1c232; border: none; padding: 5px 20px; margin: 5px 5px; } #li-form button:hover { color: #fff; } #result { padding: 20px; margin: 10px 10px; background: #F7F7F7; word-wrap: break-word; } @media only screen and (max-width: 768px) { /* For mobile phones: */ #url, #pid { width: 200px; }}

const raw_snippet = “%3Cscript%3ELiMiniFixel({pid:’YOUR_LINKEDIN_PID’,url:’YOUR_SITE_URL’});function LiMiniFixel(options){var base_li=’https://dc.ads.linkedin.com/collect/?time=[[timestamp]]&pid=[[client_li_pid]]&url=[[client_li_url]]&pageUrl=[[client_li_url]]&ref=&fmt=js&s=1′;var li_link=base_li.replace(‘[[timestamp]]’,new Date().getTime()).replace(‘[[client_li_pid]]’,options.pid).replace(‘[[client_li_url]]’,options.url).replace(‘[[client_li_url]]’,options.url);var script_li=document.createElement(‘script’);script_li.type=’text/javascript’;script_li.src=li_link;document.head.appendChild(script_li)}%3C%2Fscript%3E”; function generateScript() { var url = document.getElementById(‘url’).value; var pid = document.getElementById(‘pid’).value; var resDiv = document.getElementById(‘result’); let snippetRes = raw_snippet; snippetRes = snippetRes.replace(‘YOUR_SITE_URL’, url).replace(‘YOUR_LINKEDIN_PID’, pid); resDiv.innerText = decodeURIComponent(snippetRes); document.getElementById(“result”).style.display = “block”; return snippetRes; }

Please note:

  • The event URL’s domain must match the verified domains on your LinkedIn Ads account
  • This script can be triggered by any user engagement monitoring on the page using Google Tag Manager or other tag management solution
  • This snippet doesn’t include the full Fixel audience segmentation solution. If you would like to segment your audience by the users engagement level using Fixel, sign up here