function loadLinkedInInsightTag() {
    // 1. Initialize LinkedIn variables
    window._linkedin_partner_id = "9751282";
    window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
    window._linkedin_data_partner_ids.push(window._linkedin_partner_id);

    // 2. Initialize lintrk tracking function
    (function(l) {
        if (!l) {
            window.lintrk = function(a, b) { 
                window.lintrk.q.push([a, b]); 
            };
            window.lintrk.q = [];
        }
    })(window.lintrk);

    // 3. Create the LinkedIn Insight script element
    var scriptElement = document.createElement("script");
    scriptElement.type = "text/javascript";
    scriptElement.async = true;
    scriptElement.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";

    // 4. Append the script to the <head> of the document
    document.head.appendChild(scriptElement);
}

// Call the function to append the tag
loadLinkedInInsightTag();

function loadLinkedInFallback() {
    var noScriptImage = document.createElement("img");
    noScriptImage.height = 1;
    noScriptImage.width = 1;
    noScriptImage.style.display = "none";
    noScriptImage.alt = "";
    noScriptImage.src = "https://px.ads.linkedin.com/collect/?pid=9751282&fmt=gif";
    
    // Fallback pixels are typically appended to the body, as <img> isn't technically valid in <head>
    document.body.appendChild(noScriptImage); 
}