Reputation: 2747
I am trying to integrate Linkedin Pixel
with my Angular site
. I have configure like this :
Add this code in src/index.html
file
<script type="text/javascript">
_linkedin_partner_id = "<pixelId>";
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=<pixelId>&fmt=gif" />
</noscript>
But it only fires an event once in the LinkedIn campaign. I tried to find any SDK of Linkedin through which I can directly send an event to a campaign by calling one function in the same way as Google and Facebook analytics provide but I can't find such things.
I am adding this script into index.html using pixel.service.ts
file dynamically.
How can I send an event into the LinkedIn campaign using angular on route change
. If anyone does that kind of work then please help me. any help would be appreciated.
Upvotes: 0
Views: 4368
Reputation: 2220
Potential similar questions and their solutions might help:
Linkedin tracking for single page app in Google Tag Manager
Upvotes: 1