Skip to main content

Is there a way to completely disable the clkn wrapper, so that my links are going direct to my goal. Thanks in advance for your help!

Hi Andi,


Curious to know why you would need this ability. 🙂


Mark


Hi Mark,


the use of the Clkn wrapper could be a vulnerability issue for someone (such as a bank), since it may induce some hacker to make open redirect attack . It would be useful to be able to decide which links or buttons use the Clkn wrapper, with the possibility of excluding it if needed. It’s possible?

Thank you for your answer


Joe


Hi Folks! 

There isn’t any way to disable the  clkn wrapper at this time, as we use those clkn and clkg wrappers to keep track of stats for links and then use a 300-redirect once the appropriate count is fired back to Unbounce. Can you let us know if you’re running into any issues with these wrappers and reaching your goal? 


Yes, one way to remove the clkn wrapper is using the custom HTML element. Unbounce does not apply tracking to links in that code base. I’m doing this now because I don’t want the click wrappers on links for SEO purposes.


Thank you! This was just what I needed also for integration with CallRails to work.


Any update here on disabling the clkn wrapper?


Hi Justin, I know your post was from a year ago but I just wanted to mention that the clkn wrapper does disrupt cross-domain Google analytics tracking.


Any progress on this? @sberman is absolutely right that this breaks Google Analytics cross-domain tracking.


Hi Adam, I’ve used a custom script to remove the clkn wrapper which solved the issue with GA tracking & conversions. However, you won’t be able to track Unbounce conversions. For us, this was not an issue since we simply set up conversions through GA.


(Remove the --s from the script below)


<–script–>

lp.jQuery(function() {
(‘ashref]’).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–>


Worked like a charm! Thanks so much, @sberman.


For anyone else’s reference, I placed this script before the closing body tag


Got this script to work, Amazing.


Does anyone know if there are any new workarounds from Unbounce for this? I would like to implement cross domain tracking, but I cannot afford to lose tracking of conversions in Unbounce.


Hey Andy,


The way that external links in Unbounce are formatted will essentially always have the clkn/clkg wrapping and unfortunately there is no way to remove them, as it’s built-in through the app back end.


You could add the links within the page using our Custom HTML tool, but that would require you to build the link as HTML with all of the styling of the text being done with HTML coding. You can read up on how to use that tool here: http://documentation.unbounce.com/hc/en-us/articles/203879070#content10.


Otherwise, I’m afraid there is no other way to have links in Unbounce without our link formatting.


I’ll be sure to update this post if another workaround comes across my desk!


Hi Jess, thanks very much for the response, but too bad no better solution yet! Please do let us know if something else becomes available.


Hi @Andy2,


Just out of curiosity, if you are already using GTM/GA for tracking why can’t you afford to lose tracking of conversions in Unbounce.


GA can give you a lot more data to work with than the Unbounce reporting you get.


Best,

Hristian


@Hristian You’re right, I could track in GA (and do at times). My choice of words (" I cannot afford to lose tracking of conversions in Unbounce") perhaps too dramatic. But it also wouldn’t be NEARLY as easy as simply viewing results in Unbounce.


The loss of convenience would still be significant.


Hi @Andy2,


Unfortunately, if you remove the wrappers from the links you will lose tracking through Unbounce.


However, I would still highly recommend using GA for any test check ups or post test analysis. The granularity of data you can get from GA is light years ahead of anything else.


To make it easier you can setup custom reports/dashboards or do a quick Google Data Studio report.


Best,

Hristian


Hi,


is there now another way to remove the tracking parameters?


The script does not work for me and I don’t know why. I placed it before the body end tag and tested both, soft and non-soft wrapping. I also insert the script on each landingpage and also tested it in the script manager for the whole domain. Nothing changed.


I just had to stop all my online marketing campaigns, so I would be really thankful for a fast solution.


Thanks,

Alex


There were some little issues with the script; here’s a fixed version. If it doesn’t work, open the console and fix any errors it gives.


<script>
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)\/http\//gi, 'http://'));
});
});
</script>

@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 🙂


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.


Hi,


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?


Thanks


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.


<script>
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://'));
});
});
</script>

Reply