Skip to content

Commit

Permalink
Added LinkedIn insight tag to script footer (#1638)
Browse files Browse the repository at this point in the history
Added tracking via LinkedIn insight tag. The code is added in a
linkedin_insight partial that is called in the script footer partial so
that the linkedin elements appear just before the closing body tag.

Resolves chainguard-dev/internal#3901

Signed-off-by: Patrick Smyth <patrick.smyth@chainguard.dev>
  • Loading branch information
smythp authored Jun 27, 2024
1 parent a9137c0 commit 625ccff
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions layouts/partials/footer/linkedin-insight.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<script type="text/javascript">
_linkedin_partner_id = "6142089";
window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
window._linkedin_data_partner_ids.push(_linkedin_partner_id);
</script><script type="text/javascript">
(function(l) {
if (!l){window.lintrk = function(a,b){window.lintrk.q.push([a,b])};
window.lintrk.q=[]}
var s = document.getElementsByTagName("script")[0];
var b = document.createElement("script");
b.type = "text/javascript";b.async = true;
b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";
s.parentNode.insertBefore(b, s);})(window.lintrk);
</script>
<noscript>
<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=6142089&fmt=gif" />
</noscript>
2 changes: 2 additions & 0 deletions layouts/partials/footer/script-footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@
<script src="{{ $index.Permalink }}" integrity="{{ $index.Data.Integrity }}" crossorigin="anonymous" defer></script>
{{ end -}}
{{ end -}}

{{ partial "footer/linkedin-insight.html" . }}

0 comments on commit 625ccff

Please sign in to comment.