-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add leadinfo script for company tracking for the test purposes (#…
…804) * feat: Add leadfeeder script for company tracking for the test purposes * feat: change tracking script from leadfeeder to leadinfo --------- Co-authored-by: Dejan Zec <[email protected]>
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { useEffect } from 'react'; | ||
|
||
const LeadinfoScript = () => { | ||
useEffect(() => { | ||
const script = document.createElement('script'); | ||
script.innerHTML = ` | ||
(function(l,e,a,d,i,n,f,o){if(!l[i]){l.GlobalLeadinfoNamespace=l.GlobalLeadinfoNamespace||[]; | ||
l.GlobalLeadinfoNamespace.push(i);l[i]=function(){(l[i].q=l[i].q||[]).push(arguments)};l[i].t=l[i].t||n; | ||
l[i].q=l[i].q||[];o=e.createElement(a);f=e.getElementsByTagName(a)[0];o.async=1;o.src=d;f.parentNode.insertBefore(o,f);} | ||
}(window,document,'script','https://cdn.leadinfo.eu/ping.js','leadinfo','LI-66D184CC97CFD')); | ||
`; | ||
document.head.appendChild(script); | ||
|
||
return () => { | ||
document.head.removeChild(script); | ||
}; | ||
}, []); | ||
|
||
return null; | ||
}; | ||
|
||
export default LeadinfoScript; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters