Hub Hack: Bypass CTAs on Gated Items With a URL Parameter



  • Type: Javascript
  • Placement: Body Bottom
  • Notes: Allows you to automatically dismiss the CTA gating an Item when it is accessed from a link that contains a specified URL parameter:
    • You can copy and paste the whole code block below without making any changes. By default, the parameter name that triggers the CTA bypass is set to paramName — we recommend changing this to a parameter name of your choice, but it can also be left as-is.
    • Once the Hub Hack is in place, you can bypass the CTA by adding ?paramName (or whatever parameter name you chose) to the end of the URL of a gated Item in your Hub. For example, if the Item My Book is gated with a CTA, the CTA would appear if you go to, but not if you visit



/* start bypass CTA function code */
$(window).on('load', bypassCTA ); //must fire the bypassCTA function after everything loads, including the CTA

function bypassCTA(){
var hideWithThisParam = 'paramName';
/*change paramName to the URL parameter value you want to use to hide the CTA */

var params = {};

$.each('&'), $.proxy(function(idx, pair) {
if (pair === '') return;

var parts = pair.split('=');
this[parts[0]] = parts[1] && decodeURIComponent(parts[1].replace(/\+/g, ' '));
}, params));

$.each(params, function(idx, val){
if(idx == hideWithThisParam) {

/* end bypass CTA function code */
2 out of 2 found this helpful



Please sign in to leave a comment.