-
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 leadfeeder script for company tracking for the test purposes
- Loading branch information
Dejan Zec
authored and
Dejan Zec
committed
Aug 29, 2024
1 parent
b576ce1
commit 499a04d
Showing
2 changed files
with
33 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,31 @@ | ||
import { useEffect } from 'react'; | ||
|
||
const LeadfeederScript = () => { | ||
useEffect(() => { | ||
const script = document.createElement('script'); | ||
script.innerHTML = ` | ||
(function(ss,ex){ | ||
window.ldfdr=window.ldfdr||function(){(ldfdr._q=ldfdr._q||[]).push([].slice.call(arguments));}; | ||
(function(d,s){ | ||
var fs=d.getElementsByTagName(s)[0]; | ||
function ce(src){ | ||
var cs=d.createElement(s); | ||
cs.src=src; | ||
cs.async=1; | ||
fs.parentNode.insertBefore(cs,fs); | ||
}; | ||
ce('https://sc.lfeeder.com/lftracker_v1_'+ss+(ex?'_'+ex:'')+'.js'); | ||
})(document,'script'); | ||
})('ywVkO4XqrWdaZ6Bj'); | ||
`; | ||
document.head.appendChild(script); | ||
|
||
return () => { | ||
document.head.removeChild(script); | ||
}; | ||
}, []); | ||
|
||
return null; | ||
}; | ||
|
||
export default LeadfeederScript; |
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