Skip to main content

Hello, for specific tracking reasons I need to remove all the CLKN Wrappers in all the landing page buttons.


I followed a guide testing this Js script:


<–script–>

lp.jQuery(function() { (‘a href]’).each(function(){

(this).attr(‘href’, (this).attr(‘href’)

.replace(/clk(n|g)/https//, ‘https://’)

.replace(/clk(n|g)/http//, ‘http://’)

.replace(/clk(n|g)/tel//, ‘tel:’));

});

});

<–/script–>


But it’s not working on the landing page, in console what I see is this “lp. not defined”:



Can someone please help to fix this issue?


Thank you

Hey there,


We have a few changes in how we use jQuery on our pages, you can try using something like this:


   <script> 
(function() { document.getElementsByTagName('a').each(function(){
(this).setAttribute('href', (this).setAttribute('href')
.replace(/clk(n|g)\/https\//, 'https://')
.replace(/clk(n|g)\/http\//, 'http://')
.replace(/clk(n|g)\/tel\//, 'tel:'));
});
});
</script>

No need to have jQuery installed for this one and it should be placed before body end tag. 🙂


Is there any other way to remove the clkn?


I tried the script, but it did not work for my Unbounce landing page.


Hey there Arne,


Thanks for posting here in the Community. If you have added the script posted above, can I ask if you’ve also added the jQuery CDN script to the page? This will be needed in order for the script to work correctly. You can see the latest updates in the following thread:


pDisable clkn Wrapper - #32 by BrunaGarcia]


Hope this helps to solve the issue for you.


Reply