Disable clkn Wrapper


@Raphael_Walker, This script worked excellently. The other script gave me quite a few issues, like you said. Thanks again.


Thanks for this updated one! Extremely useful for a website caching issue we were having forwarding to /wp-content/ PDFs with /clkn/ parameters :slight_smile:


this works thanks! I just realized unbounce was doing this, I dont understand why you want to sacrifice seo for usability (tracking stuff) in all honesty… If at all you were going to do that than at least mention it somewhere hehe.

Anyway thanks for this


If you don’t want to remove Unbounce’s conversion tracking, there is a solution if you use Google Tag Manager. See this article https://www.simoahava.com/analytics/decorate-links-decorate-forms-tags/. Apply the GA tag with the Decorate Link track type, then use a trigger that only applies to clicks on an unbounce page. You could use a trigger type of Link Clicks, then apply only to some links when the gtm.elementUrl matches regex ((.*)\/clkn\/http\/(.*))|((.*)\/clkn\/https\/(.*))|((.*)\/clkg\/https\/(.*))|((.*)\/clkg\/http\/(.*)). This will decorate all outbound links on Unbounce pages.



Does this work for a button with a phone number wrapped in clkn? I added this script and it doesn’t seem to do it. Do I need to manipulate the script anyway or simply add it to the page?



If the button has a tel instead of https you would need to update the script to search for that string instead.

Try this if you are using a tel link. You may need to make some changes to the replace function below, but this should get you started.

lp.jQuery(function() { $('a[href]').each(function() {
	$(this).attr('href', $(this).attr('href')
	.replace(/^\S*clk(n|g)\/https\//gi, 'https://')
	.replace(/^\S*clk(n|g)\/tel\//gi, 'tel:')
	.replace(/^\S*clk(n|g)\/http\//gi, 'http://'));


Thanks! I got it working.


I’m glad to hear that! Happy to help anytime