Skip to content

Commit

Permalink
Add Meta and LinkedIn conversion tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
Vetle Hjelle committed Aug 9, 2024
1 parent 04be498 commit 2238cfa
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 2 deletions.
40 changes: 40 additions & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,43 @@
</div>
</div>
</footer>

<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window,document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '362827803374406');
fbq('track', 'PageView');
</script>
<noscript>
<img height="1" width="1"
src="https://www.facebook.com/tr?id=362827803374406&ev=PageView
&noscript=1"/>
</noscript>
<!-- End Meta Pixel Code -->

<!-- LinkedIn Pixel Code -->
<script type="text/javascript">
_linkedin_partner_id = "7489897";
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=7489897&fmt=gif" />
</noscript>
<!-- End LinkedIn Pixel Code -->
41 changes: 41 additions & 0 deletions layouts/partials/footer.no.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,44 @@
</div>
</div>
</footer>


<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window,document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '362827803374406');
fbq('track', 'PageView');
</script>
<noscript>
<img height="1" width="1"
src="https://www.facebook.com/tr?id=362827803374406&ev=PageView
&noscript=1"/>
</noscript>
<!-- End Meta Pixel Code -->

<!-- LinkedIn Pixel Code -->
<script type="text/javascript">
_linkedin_partner_id = "7489897";
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=7489897&fmt=gif" />
</noscript>
<!-- End LinkedIn Pixel Code -->
7 changes: 5 additions & 2 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
object-src 'self' https://kovertcdn.blob.core.windows.net;
style-src 'self' 'unsafe-inline' https://kovert.no;
img-src 'self' data: https://kovert.no *;
script-src 'self' https://kovert.no https://cdn-cookieyes.com https://www.googletagmanager.com https://googleads.g.doubleclick.net;
script-src 'self' https://kovert.no https://cdn-cookieyes.com https://www.googletagmanager.com
https://googleads.g.doubleclick.net https://snap.licdn.com/ https://connect.facebook.net/;
frame-src 'self' https://www.googletagmanager.com https://www.linkedin.com https://td.doubleclick.net/;
connect-src 'self' https://kovertcdn.blob.core.windows.net https://log.cookieyes.com https://cdn-cookieyes.com https://region1.google-analytics.com https://www.google.com/ https://googleads.g.doubleclick.net/ https://formspree.io/;
connect-src 'self' https://kovertcdn.blob.core.windows.net https://log.cookieyes.com https://cdn-cookieyes.com
https://region1.google-analytics.com https://www.google.com/ https://googleads.g.doubleclick.net/
https://formspree.io/ https://snap.licdn.com/ https://connect.facebook.net/;
">

<!-- Image -->
Expand Down

0 comments on commit 2238cfa

Please sign in to comment.